NPM 卡住给出相同的错误 EISDIR: Illegal operation on a directory, read at error (native) [英] NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)

查看:51
本文介绍了NPM 卡住给出相同的错误 EISDIR: Illegal operation on a directory, read at error (native)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我在哪个目录中,无论我在 cmd.exe 中的npm"之后输入什么,我都会遇到这个错误.这是 npm-debug.log:

I am stuck with this error no matter what directory I am in, and what I type after "npm" in cmd.exe. Here is the npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli   'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js' ]
2 info using npm@2.14.12
3 info using node@v4.2.6
4 verbose stack Error: EISDIR: illegal operation on a directory, read
4 verbose stack     at Error (native)
5 verbose cwd C:Usersme
6 error Windows_NT 6.1.7601
7 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js"
8 error node v4.2.6
9 error npm  v2.14.12
10 error code EISDIR
11 error errno -4068
12 error syscall read
13 error eisdir EISDIR: illegal operation on a directory, read
13 error eisdir This is most likely not a problem with npm itself
13 error eisdir and is related to npm not being able to find a package.json in
13 error eisdir a package you are trying to install.
14 verbose exit [ -4068, true ]

我多次尝试卸载/重新安装 nodejs,我什至删除了 C:UsersmeAppDataRoaming 中的 npm 和 npm-cache 文件夹.我不确定是什么问题导致了这个.一秒钟它工作正常,现在我无法摆脱这个错误.日志中的解释没有意义,因为它在任何目录中都会出现此错误.我应该注意,以管理员身份运行命令提示符不会出现此错误.这个星期五晚上我正在拔头发试图解决这个问题,任何帮助将不胜感激!

I have tried and uninstalling/reinstalling nodejs multiple times, I even deleted npm and npm-cache folders in C:UsersmeAppDataRoaming. I'm not sure what went wrong to cause this. One second it was working fine, and now I can't get rid of this error. The explanation in the log does not make sense, as it gives this error in any directory. I should note that running a command prompt as administrator does not give this error. I'm pulling my hair out this Friday evening trying to get this fixed, any help would be greatly appreciated!

推荐答案

在我将 npm 从 6.4.1 版升级到 6.5.0 版后,今天遇到了同样的问题.我通过从 node.js 下载 .pkg 安装程序(推荐给大多数用户)解决了这个问题,然后运行了它.

Had the same problem today after i've upgraded my npm from version 6.4.1 to version 6.5.0. I fixed this by downloading the .pkg installer (recommended for most users) from node.js and runned it afterwards.

这篇关于NPM 卡住给出相同的错误 EISDIR: Illegal operation on a directory, read at error (native)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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