npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法

npm ERR! path E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir ‘E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modules‘
npm ERR!  { Error: EPERM: operation not permitted, scandir ‘E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_modules\dashdash\node_modules‘
npm ERR!   stack: ‘Error: EPERM: operation not permitted, scandir \‘E:\\SouthernPowerGridProject\\web_project\\AutoOPS\\autoops\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules\‘‘,
npm ERR!   errno: -4048,
npm ERR!   code: ‘EPERM‘,
npm ERR!   syscall: ‘scandir‘,
npm ERR!   path: ‘E:\\SouthernPowerGridProject\\web_project\\AutoOPS\\autoops\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules‘ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ThinkT420\AppData\Roaming\npm-cache\_logs\2017-10-30T06_50_38_610Z-debug.log

之前有时报这个,以为还真是权限不够,感觉有点奇怪,用管理员权限执行,有时还真有用,不过后面查了下,时缓存的问题,清理下缓存就行,不用管理员权限。

方法1、

需要删除npmrc文件。

强调:不是nodejs安装目录npm模块下的那个npmrc文件

而是在C:\Users\{账户}\下的.npmrc文件..

方法2、

或者直接用命令清理就行,控制台输入:

npm cache clean --force

added 114 packages in 42.369s
E:\SouthernPowerGridProject\web_project\AutoOPS\autoops>npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.

E:\SouthernPowerGridProject\web_project\AutoOPS\autoops>npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 114 packages in 42.369s

成功了

原文地址:https://www.cnblogs.com/raind/p/9112455.html

时间: 2024-10-11 00:04:03

npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法的相关文章

npm install 报错(npm ERR! errno 1)

最好看错误提示,若缺少包文件,就依次安装 问题一 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: `node lib/post_install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script. npm ERR! This is probab

npm install 报错:ERR! code EINTEGRITY 解决方案

npm升级后,npm install 报错了,报错信息:ERR! code EINTEGRITY到处百度搜索解决方案,终于找到了!“npm cache verify”这条命令帮助了不少人 npm cache verify npm cache clean #这个命令执行不了,就执行下面 --force的命令 npm cache clean --force #clean掉之后重新执行npm install命令 原文地址:https://www.cnblogs.com/lwjnicole/p/1079

输入npm install 报错npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: `node scripts/build.js`

输入npm install 报以下错误 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script. npm ERR! This is probably not a

『奇葩问题集锦』npm install 报错 node-pre-gyp ERR! node-pre-gyp -v v0.6.25

gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Users\guxuelong\Desktop\dragon-ui\node_modules\.npminstall\node-gyp\3.3.1\node-gyp\lib\

"npm ERR! Error: EPERM: operation not permitted"问题解决

在基于macaca进行自动化测试的时候,遇到如下问题: E:\AutoTest\Macaca\LocalTEST\macaca-test-sample\macaca-test>macaca doctor   Node.js checklist:   node env: C:\Program Files\nodejs\node.exe  node version: v6.3.0   Android checklist:   JAVA version is `1.8.0_91`  JAVA_HOME

nhandled rejection Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache npm ERR! cb() never called!

安装全局包时报错,之前已经遇到过,结果第二次又忘记解决方法,果然还是要记下来,好记性不如烂笔头哇 $ npm i electron -gUnhandled rejection Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache\_cacache\tmp\f23044b6'npm ERR! cb() never called! npm ERR! This is an error with n

webstorm react项目报错:Error: EPERM: operation not permitted

webstorm上导入了react项目,执行npm run start 之后就报错, > cross-env APP_TYPE=site umi dev fs.js:114 throw err; ^ Error: EPERM: operation not permitted, open 'path\node_modules\.cache\@babel\register\.babel.7.2.2.development.json' at Object.openSync (fs.js:443:3)

Oracle 安装报错 [INS-06101] IP address of localhost could not be determined 解决方法

出现这种错误是因为主机名和/etc/hosts 文件不一致,只需要把主机名和其IP 写入/etc/hosts 文件,就ok了. 注意名字不能有下划线 修改network 文件之外,再使用hostname 命令指定一下主机名,就不用重启OS了. 1.     修改/etc/sysconfig/network 文件 [[email protected]~]# cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=s

Centos 6.5 启动DHCP报错 Can't chown new lease file: Operation not permitted

在使用centos 6.5安装DHCP时,配置已经全部ok,但在启动服务时报错 message" Can't chown new lease file: Operation not permitted" 服务无法正常启动, 在6.5中多了一个配置要修改,如下: 编辑 /etc/rc.d/init.d/dhcpd 文件,将其中的 user=dhcpd group=dhcpd 改为 user=root group=root 注: 如果不做此修改,启动DHCP时在 "/var/lo