在新分支中将webpack-dev-server从2.11.5升级到3.1.11
我已删除node_modules,运行了 npm缓存清理, npm安装和 npm审核修复
我的节点和npm都是最新的(v12.18.3)和(6.14.6)
还基于我在这里阅读的其他内容ReactJs : `npm run build` fails with Exit status 1
我将这些添加到了我的PATH
C:\Program Files\nodejs\node_modules\npm\bin
C:\Windows\System32
这是完整的错误
PS C:\Users\kevin\Repos\MyBookShelf> npm start
> bookshelf@1.0.0 start C:\Users\kevin\Repos\MyBookShelf
> npm run dev
> bookshelf@1.0.0 dev C:\Users\kevin\Repos\MyBookShelf
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
npm ERR! Exit status 1
npm ERR! Failed at the bookshelf@1.0.0 dev script.
t above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kevin\AppData\Roaming\npm-cache\_logs\2020-09-02T13_03_26_932Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bookshelf@1.0.0 start: `npm run dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bookshelf@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kevin\AppData\Roaming\npm-cache\_logs\2020-09-02T13_03_27_014Z-debug.log
完整日志:
0 info it worked if it ends with ok
1 verbose cli [
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 'dev'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v12.18.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle bookshelf@1.0.0~predev: bookshelf@1.0.0
6 info lifecycle bookshelf@1.0.0~dev: bookshelf@1.0.0
7 verbose lifecycle bookshelf@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle bookshelf@1.0.0~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\kevin\Repos\MyBookShelf\node_modules\.bin;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\kevin\Repos\MyBookShelf\node_modules\.bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Amazon\AWSSAMCLI\bin\;C:\Program Files\Amazon\AWSCLIV2\;C:\Users\kevin\AppData\Local\Programs\AdoptOpenJDK\bin;C:\Users\kevin\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\kevin\AppData\Local\Programs\Python\Python38-32\;C:\Users\kevin\AppData\Local\Microsoft\WindowsApps;C:\Users\kevin\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\kevin\AppData\Local\Programs\Git\cmd;C:\Users\kevin\AppData\Local\Programs\Fiddler;C:\Users\kevin\AppData\Roaming\npm
9 verbose lifecycle bookshelf@1.0.0~dev: CWD: C:\Users\kevin\Repos\MyBookShelf
10 silly lifecycle bookshelf@1.0.0~dev: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js'
10 silly lifecycle ]
11 silly lifecycle bookshelf@1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle bookshelf@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: bookshelf@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:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
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 ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid bookshelf@1.0.0
15 verbose cwd C:\Users\kevin\Repos\MyBookShelf
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v12.18.3
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 1
22 error bookshelf@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 bookshelf@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 ]
任何想法或帮助都会很棒!