首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我在使用node.js安装或创建东西时遇到问题

我在使用node.js安装或创建东西时遇到问题
EN

Stack Overflow用户
提问于 2021-06-05 09:48:38
回答 1查看 289关注 0票数 2

每当我尝试用npm npm install -g sass安装sass时,我都会收到这个问题。

代码语言:javascript
复制
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,现在我一直在解决一个又一个错误,但没有取得任何进展,请帮助我

EN

回答 1

Stack Overflow用户

发布于 2021-06-05 18:42:36

在错误日志中:

代码语言:javascript
复制
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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67845600

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档