当前位置: 首页 > 工具软件 > Bash-Utils > 使用案例 >

vue 解决 Cannot find module ‘@vue/cli-shared-utils‘

於意蕴
2023-12-01

问题报错

PS D:\Work\学习\轻云\light-cloud - 副本> npm run serve

> lightcloud@0.2.1 serve D:\Work\学习\轻云\light-cloud - 副本
> vue-cli-service serve

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

Error: Cannot find module '@vue/cli-shared-utils'
Require stack:
- D:\Work\学习\轻云\light-cloud - 副本\node_modules\_@vue_cli-service@4.5.15@@vue\cli-service\bin\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (D:\Work\学习\轻云\light-cloud - 副本\node_modules\_@vue_cli-service@4.5.15@@vue\cli-service\bin\vue-cli-service.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\Work\\学习\\轻云\\light-cloud - 副本\\node_modules\\_@vue_cli-service@4.5.15@@vue\\cli-service\\bin\\vue-cli-service.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lightcloud@0.2.1 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lightcloud@0.2.1 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\jiang\AppData\Roaming\npm-cache\_logs\2021-11-28T11_41_22_529Z-debug.log

解决

npm update
 类似资料: