Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript &引用;npm运行包“;用网页包抛出错误!代码失效循环_Javascript_Angularjs_Npm_Webpack_Bundle - Fatal编程技术网

Javascript &引用;npm运行包“;用网页包抛出错误!代码失效循环

Javascript &引用;npm运行包“;用网页包抛出错误!代码失效循环,javascript,angularjs,npm,webpack,bundle,Javascript,Angularjs,Npm,Webpack,Bundle,我是一个新手,正在学习如何使用AngularJS应用程序的网页包 我一直在关注下面关于它的精彩文章,但是当我尝试运行bundle时,我遇到了一个错误 完成npm调试日志: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-

我是一个新手,正在学习如何使用AngularJS应用程序的网页包

我一直在关注下面关于它的精彩文章,但是当我尝试运行bundle时,我遇到了一个错误

完成npm调试日志:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'bundle' ]
2 info using npm@5.6.0
3 info using node@v8.9.4
4 verbose run-script [ 'prebundle', 'bundle', 'postbundle' ]
5 info lifecycle angular-webpack-starter@1.0.0~prebundle: angular-webpack-starter@1.0.0
6 info lifecycle angular-webpack-starter@1.0.0~bundle: angular-webpack-starter@1.0.0
7 verbose lifecycle angular-webpack-starter@1.0.0~bundle: unsafe-perm in lifecycle true
8 verbose lifecycle angular-webpack-starter@1.0.0~bundle: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Usuario\Desktop\angular-webpack-starter\node_modules\.bin;C:\Program Files\Microsoft MPI\Bin\;C:\ActiveTcl\bin;C:\Perl64\site\bin;C:\Perl64\bin;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\PuTTY\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Usuario\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\Usuario\AppData\Local\Programs\Python\Python36-32\;C:\ffmpeg\bin;C:\Users\Usuario\AppData\Roaming\npm;C:\Users\Usuario\AppData\Roaming\npm\node_modules\phantomjs-prebuilt\lib\phantom\bin;C:\Users\Usuario\AppData\Local\Yarn\bin\;C:\Program Files (x86)\Microsoft VS Code\bin
9 verbose lifecycle angular-webpack-starter@1.0.0~bundle: CWD: C:\Users\Usuario\Desktop\angular-webpack-starter
10 silly lifecycle angular-webpack-starter@1.0.0~bundle: Args: [ '/d /s /c', 'webpack' ]
11 silly lifecycle angular-webpack-starter@1.0.0~bundle: Returned: code: 1  signal: null
12 info lifecycle angular-webpack-starter@1.0.0~bundle: Failed to exec bundle script
13 verbose stack Error: angular-webpack-starter@1.0.0 bundle: `webpack`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid angular-webpack-starter@1.0.0
15 verbose cwd C:\Users\Usuario\Desktop\angular-webpack-starter
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "bundle"
18 verbose node v8.9.4
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error angular-webpack-starter@1.0.0 bundle: `webpack`
22 error Exit status 1
23 error Failed at the angular-webpack-starter@1.0.0 bundle script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
0信息如果它以ok结尾,它就工作了
1详细cli['C:\\Program Files\\nodejs\\node.exe',
1 verbose cli'C:\\Program Files\\nodejs\\node\u modules\\npm\\bin\\npm cli.js',
1详细cli“运行”,
1个详细cli“bundle”]
2信息使用npm@5.6.0
3信息使用node@v8.9.4
4详细的运行脚本['prebundle','bundle','postbundle']
5信息生命周期网页包-starter@1.0.0~prebundle:angular网页包-starter@1.0.0
6信息生命周期网页包-starter@1.0.0~bundle:有棱角的网页包-starter@1.0.0
7详细的生命周期网页包-starter@1.0.0~bundle:生命周期中的不安全烫发为true
8详细的生命周期网页包-starter@1.0.0~bundle:PATH:C:\Program Files\nodejs\node\u modules\npm\node\u modules\npm lifecycle\node gyp bin;C:\Users\Usuario\Desktop\angular webpack starter\node\u modules\.bin;C:\Program Files\Microsoft MPI\Bin\;C:\ActiveTcl\bin;C:\Perl64\site\bin;C:\Perl64\bin;c:\ProgramFiles(x86)\Intel\iCLS客户端\;c:\Program Files\Intel\iCLS客户端\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R)管理引擎组件\DAL;C:\Program Files\Intel\Intel(R)管理引擎组件\IPT;C:\Program Files(x86)\Intel\Intel(R)管理引擎组件\DAL;C:\Program Files(x86)\Intel\Intel(R)管理引擎组件\IPT;C:\ProgramFiles(x86)\Intel\OpenCLSDK\2.0\bin\x86;C:\ProgramFiles(x86)\Intel\OpenCLSDK\2.0\bin\x64;C:\ProgramFiles(x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramFiles\PuTTY\;C:\ProgramFiles\MiKTeX 2.9\MiKTeX\bin\x64\;C:\ProgramFiles\nodejs\;C:\ProgramFiles(x86)\Thread\bin;C:\ProgramFiles\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramFiles\Git\cmd;C:\ProgramFiles(x86)\Microsoft VS Code\bin;C:\Users\Usuario\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\Usuario\AppData\Local\Programs\Python\Python36-32\;C:\ffmpeg\bin;C:\Users\Usuario\AppData\Roaming\npm;C:\Users\Usuario\AppData\Roaming\npm\node\u modules\phantomjs prebuild\lib\phantom\bin;C:\Users\Usuario\AppData\Local\Thread\bin\;C:\ProgramFiles(x86)\Microsoft VS Code\bin
9详细的生命周期网页包-starter@1.0.0~bundle:CWD:C:\Users\Usuario\Desktop\angular网页包启动器
10.网页包-starter@1.0.0~bundle:Args:['/d/s/c','webpack']
11.网页包-starter@1.0.0~bundle:返回:代码:1信号:null
12信息生命周期网页包-starter@1.0.0~bundle:无法执行bundle脚本
13详细堆栈错误:角度网页包-starter@1.0.0bundle:`webpack`
13详细堆栈退出状态1
13 EventEmitter上的详细堆栈。(C:\Program Files\nodejs\node\u modules\npm\node\u modules\npm lifecycle\index.js:285:16)
13 emitTwo上的详细堆栈(events.js:126:13)
13 EventEmitter.emit上的详细堆栈(events.js:214:7)
13子进程上的详细堆栈。(C:\Program Files\nodejs\node\U modules\npm\node\U modules\npm lifecycle\lib\spawn.js:55:14)
13 emitTwo上的详细堆栈(events.js:126:13)
13 ChildProcess.emit上的详细堆栈(events.js:214:7)
13 maybeClose的详细堆栈(internal/child_process.js:925:16)
13 Process.ChildProcess.\u handle.onexit处的详细堆栈(internal/child\u Process.js:209:5)
14详细的pkgid角度网页包-starter@1.0.0
15详细cwd C:\Users\Usuario\Desktop\angular网页包启动程序
16详细窗口\u NT 6.1.7601
17详细argv“C:\\Program Files\\nodejs\\node.exe”“C:\\Program Files\\nodejs\\node\U模块\\npm\\bin\\npm cli.js”“运行”“捆绑”
18详细节点v8.9.4
19详细的npm v5.6.0
20错误代码ELIFECYCLE
21错误1
22错误角度网页包-starter@1.0.0bundle:`webpack`
22错误退出状态1
23在角度网页包上出现错误失败-starter@1.0.0捆绑脚本。
23错误这可能不是npm的问题。上面可能还有其他日志输出。
24详细退出[1,true]

可能您正试图在已在使用的端口上启动服务器。尝试将lib\server-development.js中的默认端口更改为其他端口。

我刚刚对“服务器开发”、“服务器”、“开发”、“端口”进行了快速VSCode交叉搜索。。。找不到任何与以下内容相关的行或文件:/