繁体   English   中英

Webpack的“ npm run bundle”会抛出ERR! 代码ELIFECYCLE

[英]“npm run bundle” with Webpack throws ERR! code ELIFECYCLE

我是一个急于学习将Webpack与AngularJS应用程序一起使用的新手。

我一直在关注下面的精彩文章,但是在尝试运行捆绑软件时出现错误。

我一直在关注Ken Howard的文章。

完整的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 ]

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM