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

vue文件通过cnpm install后无法用npm run serve打开

/ 猿问

vue文件通过cnpm install后无法用npm run serve打开

慕移动7554114 2019-08-30 17:52:37

https://img.mukewang.com/5d68ef430001866013220799.jpg

这是问题报错的代码,vue的源代码肯定没有问题,因为昨天都还可以用
D:\xiaowa-master>cnpm install
√ Installed 23 packages
√ Linked 0 latest versions
√ Run 0 scripts
√ All packages installed (used 198ms(network 187ms), speed 29.85kB/s, json 1(5.58kB), tarball 0B)

D:\xiaowa-master>npm run serve

hello-world@0.1.0 serve D:\xiaowa-master
vue-cli-service serve

internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module 'semver'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (D:\xiaowa-master\node_modules_@vue_cli-service@3.11.0@@vue\cli-service\bin\vue-cli-service.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello-world@0.1.0 serve: vue-cli-service serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello-world@0.1.0 serve 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\1255109002\AppData\Roaming\npm-cache_logs\2019-08-30T08_57_09_953Z-debug.log

D:\xiaowa-master>

之前都正常,昨天电脑更新了一下,今天打开就不行了,有大哥懂原因的吗

查看完整描述

1 回答

?
慕的地1457696

//img.mukewang.com/5d989edc00018f8e03190067.jpgnpm install semver  (414试一试)

查看完整回答
反对 回复 2019-10-05

添加回答

回复

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信