为了账号安全,请及时绑定邮箱和手机立即绑定

npm start开启不成功,请大家帮忙看看

https://img1.sycdn.imooc.com//5b2114990001c61711530358.jpg

其中查看日志是这样的:

0 info it worked if it ends with ok

1 verbose cli [ 'D:\\nodejs\\node.exe',

1 verbose cli   'C:\\Users\\oiu\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js',

1 verbose cli   '--userconfig=C:\\Users\\oiu\\.cnpmrc',

1 verbose cli   '--disturl=https://npm.taobao.org/mirrors/node',

1 verbose cli   '--registry=https://registry.npm.taobao.org',

1 verbose cli   'start' ]

2 info using npm@6.1.0

3 info using node@v8.11.3

4 verbose run-script [ 'prestart', 'start', 'poststart' ]

5 info lifecycle es6-webpack@1.0.0~prestart: es6-webpack@1.0.0

6 info lifecycle es6-webpack@1.0.0~start: es6-webpack@1.0.0

7 verbose lifecycle es6-webpack@1.0.0~start: unsafe-perm in lifecycle true

8 verbose lifecycle es6-webpack@1.0.0~start: PATH: C:\Users\oiu\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\oiu\es6-webpack\node_modules\.bin;C:\Users\oiu\bin;D:\Git\mingw64\bin;D:\Git\usr\local\bin;D:\Git\usr\bin;D:\Git\usr\bin;D:\Git\mingw64\bin;D:\Git\usr\bin;C:\Users\oiu\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;D:\jdk1.8\bin;D:\jdk1.8\jre\bin;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\WINDOWS\System32\OpenSSH;D:\Git\cmd;D:\nodejs;C:\Users\oiu\AppData\Local\Microsoft\WindowsApps;C:\Users\oiu\AppData\Roaming\npm;D:\Git\usr\bin\vendor_perl;D:\Git\usr\bin\core_perl

9 verbose lifecycle es6-webpack@1.0.0~start: CWD: C:\Users\oiu\es6-webpack

10 silly lifecycle es6-webpack@1.0.0~start: Args: [ '/d /s /c', 'webpack-dev-server --open' ]

11 silly lifecycle es6-webpack@1.0.0~start: Returned: code: 1  signal: null

12 info lifecycle es6-webpack@1.0.0~start: Failed to exec start script

13 verbose stack Error: es6-webpack@1.0.0 start: `webpack-dev-server --open`

13 verbose stack Exit status 1

13 verbose stack     at EventEmitter.<anonymous> (C:\Users\oiu\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\node_modules\npm-lifecycle\index.js:304: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\oiu\AppData\Roaming\npm\node_modules\cnpm\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 es6-webpack@1.0.0

15 verbose cwd C:\Users\oiu\es6-webpack

16 verbose Windows_NT 10.0.17134

17 verbose argv "D:\\nodejs\\node.exe" "C:\\Users\\oiu\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js" "--userconfig=C:\\Users\\oiu\\.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--registry=https://registry.npm.taobao.org" "start"

18 verbose node v8.11.3

19 verbose npm  v6.1.0

20 error code ELIFECYCLE

21 error errno 1

22 error es6-webpack@1.0.0 start: `webpack-dev-server --open`

22 error Exit status 1

23 error Failed at the es6-webpack@1.0.0 start script.

23 error This is probably not a problem with npm. There is likely additional logging output above.

24 verbose exit [ 1, true ]


正在回答

7 回答

楼主问题解决了吗?

0 回复 有任何疑惑可以回复我~

yarn 安装了,从新 npm start 还是不行

0 回复 有任何疑惑可以回复我~

请问解决了吗  

0 回复 有任何疑惑可以回复我~

每次都得重新装,无法开启,这方法难道必须得这样吗?

0 回复 有任何疑惑可以回复我~

同问题

0 回复 有任何疑惑可以回复我~

请问解决了吗  我也遇到这个问题了 试了网上各种方法都无果

0 回复 有任何疑惑可以回复我~

执行yarn,重新安装一下依赖看看

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
ES6快速入门
  • 参与学习       64234    人
  • 解答问题       137    个

用最通俗、形象的方法描述ES6的强大并教会你正确的学习方法。

进入课程

npm start开启不成功,请大家帮忙看看

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信