EPERM:不允许操作,mkdir 'C:\Program Files\nodejs\node_modules\.staging [英] EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging

查看:516
本文介绍了EPERM:不允许操作,mkdir 'C:\Program Files\nodejs\node_modules\.staging的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的项目上运行 npm install 但它显示 EPERM: operation not allowed, mkdir 'C:\Program Files\nodejs\node_modules.staging

I'm trying to run npm install on my project but its showing EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules.staging

我没有 root 管理权限.我在我的系统中作为本地用户使用,我的系统是 Windows 10

I don't have root administrative access. I'am using as local user in my system and my system is windows 10

节点 v10.16.3npm v6.11.3

node v10.16.3 npm v6.11.3

谁能帮我解决这个问题.我请你们.

Can any one please help me to resolve this issue. I'am requesting you guys please.

3235 error code EPERM
3236 error syscall mkdir
3237 error path C:\Program Files\nodejs\node_modules\.staging
3238 error errno -4048
3239 error Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'
3239 error  { [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging']
3239 error   cause:
3239 error    { Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'
3239 error      errno: -4048,
3239 error      code: 'EPERM',
3239 error      syscall: 'mkdir',
3239 error      path: 'C:\\Program Files\\nodejs\\node_modules\\.staging' },
3239 error   stack:
3239 error    'Error: EPERM: operation not permitted, mkdir \'C:\\Program Files\\nodejs\\node_modules\\.staging\'',
3239 error   errno: -4048,
3239 error   code: 'EPERM',
3239 error   syscall: 'mkdir',
3239 error   path: 'C:\\Program Files\\nodejs\\node_modules\\.staging',
3239 error   parent: 'nodemon' }
3240 error The operation was rejected by your operating system.
3240 error It's possible that the file was already in use (by a text editor or antivirus),
3240 error or that you lack permissions to access it.
3240 error
3240 error If you believe this might be a permissions issue, please double-check the
3240 error permissions of the file and its containing directories, or try running
3240 error the command again as root/Administrator.
3241 verbose exit [ -4048, true ]

推荐答案

尝试清除缓存:

  • npm 缓存清理 --force

  1. npm uninstall npm -g
  2. npm install npm -g

  • npm 设置前缀 'C:\Users\User\AppData\Roaming\npm'

最后一个对我有用

这篇关于EPERM:不允许操作,mkdir 'C:\Program Files\nodejs\node_modules\.staging的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆