升级webpack4.26.1 npm run dev报错Failed at the project dev script.
用vue-cli搭建的项目,默认是webpack3.6.0,然后给它升级到webpack4.26.1,经过一系列的操作解决了一堆报错。。。这个错不知道怎么解决了,求指教
package.json
日志详情:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using npm@5.6.0
3 info using node@v8.9.1
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle vue-project@1.0.0~predev: vue-project@1.0.0
6 info lifecycle vue-project@1.0.0~dev: vue-project@1.0.0
7 verbose lifecycle vue-project@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle vue-project@1.0.0~dev: PATH: C:UsersAdministratorAppDataRoamingnpmnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;F:vue-projectnode_modules.bin;%MAVEN_HOME/bin%;%MYSQL_HOME%bin;%JAVA_HOME%bin;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)Gitcmd;C:Program Filesnodejs;C:Program FilesTortoiseSVNbin;D:Fiddler;C:UsersAdministratorAppDataRoamingnpm
9 verbose lifecycle vue-project@1.0.0~dev: CWD: F:vue-project
10 silly lifecycle vue-project@1.0.0~dev: Args: [ '/d /s /c',
10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js' ]
11 silly lifecycle vue-project@1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle vue-project@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: vue-project@1.0.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:UsersAdministratorAppDataRoamingnpmnode_modulesnpmnode_modulesnpm-lifecycleindex.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:UsersAdministratorAppDataRoamingnpmnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.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 vue-project@1.0.0
15 verbose cwd F:vue-project
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "dev"
18 verbose node v8.9.1
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error vue-project@1.0.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
22 error Exit status 1
23 error Failed at the vue-project@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请问你解决了吗?我也遇到这个问题了
webpack3
升级到webpack4
确实会遇到一些问题,主要是自身的依赖,及周边的loader
或plugins
。提供一个已经升级好的项目模板,可以参考下,传送门