

ENOTDIR: not a directory, open package.json Solution
source link: https://finisky.github.io/en/npm-enotdir-error-solution/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

ENOTDIR: not a directory, open package.json Solution
2022-11-16 Linux
When I install elasticdump, the following error appears:
$ npm install elasticdump
...
npm WARN @1.0.0 No description
npm WARN @1.0.0 No repository field.
npm ERR! Linux 5.4.0-1091-azure
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "elasticdump"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /home/finisky/node_modules/.staging/@types/node-1f2b596d/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/home/finisky/node_modules/.staging/@types/node-1f2b596d/package.json'
I spent hours to figure out the root cause: npm is deprecated (v3.5.2).
Solve the issue is easy, just upgrade npm:
$ curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
$ sudo apt install nodejs
Then:
$ npm --version
8.19.2
Reinstall elasticdump and you are done!
$ npm install elasticdump
</div
Recommend
-
21
ListingProWP - End-to-End WordPress Directory Solution. No Paid-Plugins Needed - NEXT
-
11
Does not Php read a specific directory? advertisements Something strange happens with my centos server. I have an asterisk server and I need t...
-
7
Could not find directory of OpenSSL installation ...
-
5
Test if the file is NOT a directory in Perl advertisements I'm aware you can test if a file is a directory usin...
-
4
Package development: run a package from a local directory Jan 26, 2018 ...
-
9
Kill a zombie database (not in the directory but can’t create it) November 2, 2006 I tried to create a database but coul...
-
8
Sun Directory Server can not connect to the ldap server advertisements I'am installing ArcGisServer for the Java plataform...
-
7
This post shows how to convert data to JSON format and save the data in the directory, and if the directory does not exist, it will be created first. Souce Code
-
6
[Golang] Create Directory If Not Exist March 28, 2017 Create a directo...
-
12
Jesper Magnusson September 19, 2022 1 minute re...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK