vue.v3@0.1.0 serve: `vue-cli-service serve`

荒凉一梦 提交于 2021-01-29 19:09:28

问题


i install bootstarp-vue " npm install bootstarp-vue " , i get a error When i run the project .

λ npm run serve

> vue.v3@0.1.0 serve G:\vue\vue.v3
> vue-cli-service serve

'vue-cli-service' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue.v3@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue.v3@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\hp\AppData\Roaming\npm-cache\_logs\2019-12-02T10_50_03_822Z-debug.log

I have tried " npm install " and nothing change --- i removed the node_module and run npm install and get this error

 λ npm install
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path G:\vue\vue.v3\node_modules\register-service-worker\npm-shrinkwrap.json
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'G:\vue\vue.v3\node_modules\register-service-worker\npm-shrinkwrap.json'
npm ERR!  [OperationalError: EPERM: operation not permitted, open 'G:\vue\vue.v3\node_modules\register-service-worker\npm-shrinkwrap.json'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, open 'G:\vue\vue.v3\node_modules\register-service-worker\npm-shrinkwrap.json'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'open',
npm ERR!     path: 'G:\\vue\\vue.v3\\node_modules\\register-service-worker\\npm-shrinkwrap.json'
npm ERR!   },
npm ERR!   isOperational: true,
npm ERR!   stack: "Error: EPERM: operation not permitted, open 'G:\\vue\\vue.v3\\node_modules\\register-service-worker\\npm-shrinkwrap.json'",
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'G:\\vue\\vue.v3\\node_modules\\register-service-worker\\npm-shrinkwrap.json',
npm ERR!   parent: 'vue.v3'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hp\AppData\Roaming\npm-cache\_logs\2019-12-02T11_11_58_100Z-debug.log

回答1:


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hypermarket@0.1.0 serve: `vue-cli-service serve`
npm ERR!
npm ERR! Failed at the hypermarket@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

This happens when you remove a Dependency from package.js.

---->For example: when i removed the "eslint" by npm remove eslint command , encountered this error.

---->my solution is: npm install eslint

i found the my problem by compare "package.js" using git changes.



来源:https://stackoverflow.com/questions/59137405/vue-v30-1-0-serve-vue-cli-service-serve

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!