Rror: Eisdir: Illegal Operation on a Directory

NPM stuck giving the same fault EISDIR: Illegal operation on a directory, read at error (native)

  • Abode
  • Question
  • NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)

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 information technology ends with ok 1 verbose cli [ 'C:\\Programme Files\\nodejs\\node.exe', 1 verbose cli   'C:\\Plan Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js' ] 2 info using [email protected] 3 info using [email protected] 4 verbose stack Fault: EISDIR: illegal operation on a directory, read four verbose stack     at Mistake (native) 5 verbose cwd C:\Users\me six mistake Windows_NT half-dozen.one.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.two.6 9 error npm  v2.fourteen.12 10 error lawmaking EISDIR eleven mistake errno -4068 12 error syscall read 13 error eisdir EISDIR: illegal operation on a directory, read thirteen error eisdir This is most probable not a problem with npm itself 13 mistake eisdir and is related to npm non being able to detect a bundle.json in 13 mistake eisdir a package you are trying to install. xiv verbose go out [ -4068, true ]                          

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

This question is tagged with node.js windows cmd npm file-permissions

~ Asked on 2016-01-23 02:43:37

32 Answers


I ran into the aforementioned problem while I was changing some npm settings. I did a mistake with one npm config set command and this added a line referring to a non-existing directory to C:\Users\{User}\.npmrc. Afterward I deleted that line manually from .npmrc, the trouble was gone.

~ Answered on 2016-02-16 10:04:37


EISDIR stands for "Fault, Is Directory". This means that NPM is trying to do something to a file but it is a directory. In your case, NPM is trying to "read" a file which is a directory (Line: 4). Since the performance cannot be done the mistake is thrown.

Three things to make sure hither.

  1. Make sure the file exists. If it does not, you demand to create it. (If NPM depends on any specific information in the file, you will demand to have that information there).
  2. Make sure it is in fact a file and not a directory.
  3. Information technology has the right permissions. You can change the file to have all permissions with "sudo chmod 777 FILE_NAME". (Careful: You are giving Read, Write and Execute permissions to every one on that file)

~ Answered on 2017-03-08 sixteen:55:55


Had the aforementioned problem today subsequently i've upgraded my npm from version six.iv.1 to version 6.5.0. I fixed this by downloading the .pkg installer (recommended for most users) from node.js and runned it later.

~ Answered on 2018-12-28 10:53:17


In my instance I was getting the "EISDIR: illegal functioning on a directory, read" because in my .angular-cli.json file I wasn't providing a total path in "scripts:"

For example I had

              "scripts": [         "../node_modules/hammerjs",         "../node_modules/moment"       ],                          

In fact it should have been

              "scripts": [         "../node_modules/hammerjs/hammer.min.js",         "../node_modules/moment/min/moment.min.js"       ],                          

~ Answered on 2018-01-19 09:07:01


I had the same issue on Mac Os X (installed with homebrew), and the .npmrc is non the just identify node stored config variables. There is a glocal npmrc config file in /usr/local/etc that you lot take to edit using this control:

              sudo nano npmrc                          

Remove the ca= line, or whatever the config setting was that broke your install, save that file, and try npm once more, and you lot should see information technology working.

~ Answered on 2016-07-27 17:54:25


These foreign errors occured recently on my OSX machine.

I could help myself the quick & dirty way by running:

sudo chmod -R 777 /usr/local/lib/node_modules/

Something seemed to have messed up the access rights of all global node modules.

~ Answered on 2019-01-14 14:12:29


For me fixing was add together slash after directory proper name

~ Answered on 2018-06-20 xx:10:34


If your problem is associated with the React Native packager. Attempt resetting the enshroud with react-native starting time --reset-enshroud.

~ Answered on 2018-02-12 nineteen:05:23


Make sure node_modules (and your root package.json) doesn't contain a reference to npm'southward "package.json" module. Deleting parcel.json FOLDER from node_modules solved the issue for me.

~ Answered on 2019-10-01 06:20:l


Bank check to ensure you are running npm install from the proper directory.

(The parcel.json file could be one extra directory downwards, for example.)

~ Answered on 2016-12-twenty 12:36:04


I had this issue with gulp. The problem was that gulp added a dependency to my source file and I recall npm tried to open it:

              {   "name": "name",   "version": "2.0.0",   "description": "",   "principal": "gulpfile.js",   "scripts": {     "exam": "echo \"Error: no test specified\" && leave ane"   },   "author": "",   "license": "ISC",   "devDependencies": {     "appname": "file://gulp",     "gulp-concat": "^2.6.1",     "gulp-electron": "^0.1.3",     "gulp-shell": "^0.five.two",     "gulp-uglify": "^ii.0.0",     "gulp-util": "^3.0.7",     "node-7z": "^0.4.0"   } }                          

Brand sure that at that place are no foreign references in y'all package.json file.

~ Answered on 2016-11-25 12:08:22


~ Answered on 2016-01-25 19:34:15


Had the same problem until I tried deleting the .git binder. It worked. I guess this type of problem tin can accept different causes.

~ Answered on 2018-01-19 21:39:28


In my case, i was facing this issue while installing create-react-app in MAC (Mojave OS) with following command :

              sudo npm install create-react-app -g                          

and got errors similar this :

              npm WARN tar EISDIR: illegal functioning on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/scheduler' npm WARN tar EISDIR: illegal operation on a directory, open up '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/symbol' npm WARN tar EISDIR: illegal performance on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/testing' npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/util' npm WARN tar EISDIR: illegal operation on a directory, open up '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/src/webSocket' npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/symbol' npm WARN tar EISDIR: illegal performance on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/testing' npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/util' npm WARN tar EISDIR: illegal functioning on a directory, open '/usr/local/lib/node_modules/.staging/rxjs-a84420a7/webSocket'                          

I have read npm.community that try to install without sudo :

              npm install create-react-app -grand                          

and it actually solved my upshot ..!!

~ Answered on 2019-04-23 09:12:31


In my instance I forgot to laissez passer the full path of one of the file it was request. After passing full path of the file worked :)

~ Answered on 2019-04-16 21:51:55


I fixed this effect by moving my directory from my exFAT drive which does not support symlinking.

My exFat drive is shared between osx and a bootcamp windows segmentation so when I tried to clone and npm install my projection it was failing but never explains that exFAT doesn't support this functionality.

There are drivers out at that place that you can install to add the ability to symlink but you'll take to do a lot of your setup manually compared to running a simple npm script.

~ Answered on 2020-02-05 21:25:56


In my case, the C:\Users\{user}\AppData\local\npm files were hidden, so I was non able to find & delete the trouble directory. Took me DAYS to realize this!

So double check to un-hibernate any folders then you don't miss them! Hither's a link to do this if you don't know how.

~ Answered on 2020-06-29 21:23:52


This happened to me on npm publish --access public command. Project contained directory named package.json. This fault is sad - considering project HAS to have this directory and named exactly packet.json (information technology was part of test case fixture to assert correct behavior of this lib).

~ Answered on 2021-01-14 nineteen:06:42


I had faced similar consequence. I ready cafile using the command:

              npm config set cafile PATH_TO_CERTIFICATE                          

I was able to resolve this by deleting the document file settings, and setting strict-ssl = faux.

~ Answered on 2020-01-25 12:46:55


In my example, I am working on angularv10 with material. I had changed some script files and forgot to remove these empty "" in the scripts array

scripts: [.....bla, bla, etc, ""]

remove these empty""

npm clear-cache --forcefulness

close and open vscode

It worked.

~ Answered on 2021-01-07 05:27:26


In my case issue was that space grapheme was in the name of the source folder (Windows 10).

~ Answered on 2020-10-06 22:30:55


On Mac:

Per-user config file: ~/.npmrc

~ Answered on 2020-10-01 14:34:05


In my case these steps solved my problem:

  1. terminating npm process (CTRL + C)
  2. deleting entire folder
  3. creating new one
  4. running npm over again

~ Answered on 2019-05-29 07:43:05


Brand sure to check your version of npm and whether or non in that location are issues with information technology. I was having the same issue at the time of this post and I discovered that my npm version (6.5) was having issues. I had to uninstall and reinstall npm version half-dozen.4.1 and then everything started to work great over again.

~ Answered on 2019-01-24 21:24:49


In my case, I'm using Windows ten in Castilian and this version mixes English and Spanish directory names. My problem was that the desktop directory has this name for some commands and escritorio to others. I believe that npm cannot resolve this. My solution was to only change to another directory starting from C:\ different to my home directory.

~ Answered on 2019-12-05 xv:51:x


For mac os: If installed directly from nodejs website the npmrc file would exist located in /usr/local/etc/npmrc. Just delete the config which is undefined and this problem would be stock-still.

~ Answered on 2020-03-06 23:46:28


I had the same effect. At that place was a linked folder in my directory which was causing the issue. i added that folder to ignore list and then information technology started working fine as expected.

~ Answered on 2018-05-31 sixteen:27:09


Just delete .npmrc folder in c:users>'username' and try running the control it will be resolved !

~ Answered on 2020-11-23 09:17:12


I know this isn't specifically asking about forever js.. but google pb me here so.. For me information technology was as simple every bit an ending slash.

I just changed:

              forever start -a -fifty /dev/naught/ /var/www/node/my_file.js                          

To:

              forever start -a -fifty /dev/null /var/www/node/my_file.js                          

And the error disappeared

~ Answered on 2018-06-01 22:35:48


I had a broken symlink to node_modules in a subfolder

~ Answered on 2019-04-10 08:32:25


I had a like problem while setting upwardly boilerplate code. It was reading my bundle.js file equally a directory. And then every bit stated hither. EISDIR mean its a directory and not a file. To gear up the upshot, I deleted the file and simply recreated (it was originally created automatically). If y'all cannot notice the file (considering its subconscious), simply use the terminal to find and delete information technology.

~ Answered on 2017-06-01 22:01:47


I merely removed the line

              .babel('resources/assets/js/app.js')                          

for laravel v.6 with vue.js. in webpack.mix.js

~ Answered on 2020-05-20 07:12:xiv


mcnamaraefuld1951.blogspot.com

Source: https://syntaxfix.com/question/3872/npm-stuck-giving-the-same-error-eisdir-illegal-operation-on-a-directory-read-at-error-native

Related Posts

0 Response to "Rror: Eisdir: Illegal Operation on a Directory"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel