0 info it worked if it ends with ok
1 verbose cli [ 'G:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\acer\\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.4
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle hello@1.0.0~predev: hello@1.0.0
6 info lifecycle hello@1.0.0~dev: hello@1.0.0
7 verbose lifecycle hello@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle hello@1.0.0~dev: PATH: C:\Users\acer\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;F:\GitHub\hello\hello\node_modules\.bin;C:\Users\acer\bin;G:\Program Files\Git\mingw64\bin;G:\Program Files\Git\usr\local\bin;G:\Program Files\Git\usr\bin;G:\Program Files\Git\usr\bin;G:\Program Files\Git\mingw64\bin;G:\Program Files\Git\usr\bin;C:\Users\acer\bin;G:\Program Files\Java\jdk1.8.0_92\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;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)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;F:\apache-maven-3.3.9-bin\apache-maven-3.3.9\bin;C:\Python27;C:\Python27\Lib\site-packages\django;C:\Python27\Scripts;G:\Program Files\MATLAB\R2014a\runtime\win64;G:\Program Files\MATLAB\R2014a\bin;G:\Program Files\MATLAB\R2014a\polyspace\bin;D:\360Downloads\NVIDIA\CaffeDev\caffe-windows\Build\x64\Release;G:\Program Files\opencv\build\x86\vc12\bin;D:\360Downloads\NVIDIA\CaffeDev\caffe-windows\3dparty\bin;G:\Program Files\ffmpeg\bin;G:\Program Files\nodejs;G:\Program Files\Git\cmd;G:\Program Files\Git\usr\bin;D:\ssh;G:\Program Files\opencv\build\x86\vc12\bin;G:\Program Files\ssh;C:\Users\acer\AppData\Roaming\npm;G:\Program Files\Microsoft VS Code\bin;G:\Program Files\Git\usr\bin\vendor_perl;G:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle hello@1.0.0~dev: CWD: F:\GitHub\hello\hello
10 silly lifecycle hello@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 hello@1.0.0~dev: Returned: code: 1  signal: null
12 info lifecycle hello@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: hello@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:\Users\acer\AppData\Roaming\npm\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:\Users\acer\AppData\Roaming\npm\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 hello@1.0.0
15 verbose cwd F:\GitHub\hello\hello
16 verbose Windows_NT 6.1.7601
17 verbose argv "G:\\Program Files\\nodejs\\node.exe" "C:\\Users\\acer\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v8.9.4
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error hello@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 hello@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 ]

1、试一下 卸载npm uninstall webpack-dev-server,在安装这个npm i webpack-dev-server@2.9.7,我的可以正常启动了。
2、删除node_modules目录,使用npm install,不要用cnpmnpm也是可以设置成淘宝镜像的,cnpm有时候用起来会有很多问题,无名无故的安装些多余的东西。

Logo

前往低代码交流专区

更多推荐