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

老师~! npm run serve 报错

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

node -v : 10.16.0

npm -v: 6.9.0

vue -V : 3.7.0


下面是那个complete log

--------------------------

0 info it worked if it ends with ok

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   'serve' ]

2 info using npm@6.9.0

3 info using node@v10.16.0

4 verbose run-script [ 'preserve', 'serve', 'postserve' ]

5 info lifecycle absurd@0.1.0~preserve: absurd@0.1.0

6 info lifecycle absurd@0.1.0~serve: absurd@0.1.0

7 verbose lifecycle absurd@0.1.0~serve: unsafe-perm in lifecycle true

8 verbose lifecycle absurd@0.1.0~serve: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\vue\abrupt\absurd\node_modules\.bin;C:\jdk1.8.0_191\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Java\jdk1.7.0_79\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\ZhangJing\AppDate\Roaming\npm;C:\Users\ZhangJing\AppData\Roaming\npm

9 verbose lifecycle absurd@0.1.0~serve: CWD: D:\vue\abrupt\absurd

10 silly lifecycle absurd@0.1.0~serve: Args: [ '/d /s /c', 'vue-cli-service serve' ]

11 silly lifecycle absurd@0.1.0~serve: Returned: code: 134  signal: null

12 info lifecycle absurd@0.1.0~serve: Failed to exec serve script

13 verbose stack Error: absurd@0.1.0 serve: `vue-cli-service serve`

13 verbose stack Exit status 134

13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)

13 verbose stack     at EventEmitter.emit (events.js:198:13)

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:198:13)

13 verbose stack     at maybeClose (internal/child_process.js:982:16)

13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

14 verbose pkgid absurd@0.1.0

15 verbose cwd D:\vue\abrupt\absurd

16 verbose Windows_NT 6.1.7601

17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"

18 verbose node v10.16.0

19 verbose npm  v6.9.0

20 error code ELIFECYCLE

21 error errno 134

22 error absurd@0.1.0 serve: `vue-cli-service serve`

22 error Exit status 134

23 error Failed at the absurd@0.1.0 serve script.

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

24 verbose exit [ 134, true ]


正在回答

1 回答

通过“A complete log of this run can be found in”发现,原来是npm版本的问题,然后更新了npm版本(其实也不是更新,运行完命令,版本号没变,感觉是是完善了一些组件),然后再装脚手架,搞定

全局更新 

npm install npm -g 

或者用淘宝镜像命令 

cnpm install npm -g



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

Icbto 提问者

我试了呢,node都重新装了,还是不行~ 谢谢
2019-07-01 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
vue2.5入门
  • 参与学习       146813    人
  • 解答问题       657    个

快速理解Vue编程理念上手Vue2.0开发。

进入课程

老师~! npm run serve 报错

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