每当我尝试用npm npm install -g sass安装sass时,我都会收到这个问题。
npm WARN log failed to remove log file C:/Users/MaMa~Nora~0U0/AppData/Roaming/npm-cache/_logs/2021-06-03T22_51_22_690Z-debug.log
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/sass failed, reason: connect ETIMEDOUT 104.16.24.35:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Users\MaMa~Nora~0U0\AppData\Roaming\npm-cache\_cacache\tmp\644a6159
npm ERR! errno EPERM
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/picomatch: EPERM: operation not permitted, open 'C:\Users\MaMa~Nora~0U0\AppData\Roaming\npm-cache\_cacache\tmp\644a6159'
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/picomatch: EPERM: operation not permitted, open 'C:\Users\MaMa~Nora~0U0\AppData\Roaming\npm-cache\_cacache\tmp\644a6159'
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15 {
npm ERR! code: 'EPERM',
npm ERR! errno: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\\Users\\MaMa~Nora~0U0\\AppData\\Roaming\\npm-cache\\_cacache\\tmp\\644a6159',
npm ERR! type: 'system',
npm ERR! requiredBy: 'node_modules/sass/node_modules/anymatch'
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.实际上,我不能同时使用命令npx create-react-app ...
节点是否与我的笔记本电脑不兼容,或者我的互联网是失败的原因?我只是想学习node.js,现在我一直在解决一个又一个错误,但没有取得任何进展,请帮助我
发布于 2021-06-05 18:42:36
在错误日志中:
errno EPERM
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/picomatch: EPERM: operation not permitted, open 'C:\Users\MaMa~Nora~0U0\AppData\Roaming\npm-cache\_cacache\tmp\644a6159'EPERM是权限问题的代码。您可以尝试以管理员身份运行命令行以获得适当的权限,然后重新运行npm install -g sass
https://stackoverflow.com/questions/67845600
复制相似问题