项目拉下来之后 直接执行npm install报错
操作系统拒绝此操作
每次一执行到pack什么的时候就报下面这样的错误
后面执行代码的时候报 webpack-dev-server不存在,不让运行
应该是npm install安装不到位导致的
搞了五六个小时
最后发现是360杀毒软件的问题,关掉杀毒软件再install就畅通无阻了
真的是巨坑
查找过程中发现有几篇不错的文章:
解决办法总结
报错:no such file: … node-sass\vendor
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\x\PycharmProjects\frontend\node_modules\vue-template-compiler\package.json.397178093
npm ERR! dest C:\Users\x\PycharmProjects\frontend\node_modules\vue-template-compiler\package.json
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\x\PycharmProjects\frontend\node_modules\vue-template-compiler\package.json.397178093' -> 'C:\Users\x\PycharmProjects\frontend\node_modules\vue-template-compiler\package.json'
npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\Users\x\PycharmProjects\frontend\node_modules\vue-template-compiler\package.json.397178093' -> 'C:\Users\x\PycharmProjects\frontend\node_modules\vue-template-compiler\package.json'] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\Users\x\PycharmProjects\frontend\node_modules\vue-template-compiler\package.json.397178093' -> 'C:\Users\x\PycharmProjects\frontend\node_modules\vue-template-compiler\package.json'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\x\\PycharmProjects\\frontend\\node_modules\\vue-template-compiler\\package.json.397178093',
npm ERR! dest: 'C:\\Users\\x\\PycharmProjects\\frontend\\node_modules\\vue-template-compiler\\package.json'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\x\\PycharmProjects\\frontend\\node_modules\\vue-template-compiler\\package.json.397178093',npm ERR! dest: 'C:\\Users\\x\\PycharmProjects\\frontend\\node_modules\\vue-template-compiler\\package.json',
npm ERR! parent: 'frontend'
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\x\AppData\Roaming\npm-cache\_logs\2023-06-06T07_17_10_293Z-debug.log