gpt4 book ai didi

node.js - 将 webpack-dev-server 更新到 3.2.1 后的 Vue.js 项目 - 引发错误

转载 作者:太空宇宙 更新时间:2023-11-04 01:34:25 25 4
gpt4 key购买 nike

更新到3.2.1版本时会抛出错误。 2.9.7之前没有这个错误。

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run-script',
1 verbose cli 'dev' ]
2 info using npm@6.8.0
3 info using node@v10.13.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle mcute@1.0.0~predev: mcute@1.0.0
6 info lifecycle mcute@1.0.0~dev: mcute@1.0.0
7 verbose lifecycle mcute@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle mcute@1.0.0~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/turtuvshin/Projects/mcute/frontend/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/turtuvshin/Projects/mcute/node_modules/.bin:/usr/local/mongodb/bin:/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/mongodb/bin:/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin
9 verbose lifecycle mcute@1.0.0~dev: CWD: /Users/turtuvshin/Projects/mcute/frontend
10 silly lifecycle mcute@1.0.0~dev: Args: [ '-c',
10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js' ]
11 silly lifecycle mcute@1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle mcute@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: mcute@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> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid mcute@1.0.0
15 verbose cwd /Users/turtuvshin/Projects/mcute/frontend
16 verbose Darwin 18.2.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run-script" "dev"
18 verbose node v10.13.0
19 verbose npm v6.8.0
20 error code ELIFECYCLE
21 error errno 1
22 error mcute@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 mcute@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 ]

最佳答案

与此错误有关的问题有很多。从版本 2.9.7 升级 webpack-dev-server 存在已知错误。最快的解决方案是将其降级到 v2.9.7

npm install webpack-dev-server@2.9.7 --save-dev

此外,请检查项目中的 vuejs 版本和 webpack 版本,因为它们也必须与 wepack-dev-server 的正确版本兼容。

关于node.js - 将 webpack-dev-server 更新到 3.2.1 后的 Vue.js 项目 - 引发错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54995159/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com