Note: I have latest npm and node versions. I have tried the answers provided in npm install error ENOTDIR but didn't work for me.
I need to install 2 npm modules got as .tgz packages on NodeRed
1. x.tgz
2. y.tgz
I could install the first package using npm install path/to/x.tgz
I used the same command npm install path/to/y.tgz
command but I am getting following error.
malintha@malintha-VirtualBox:~/.node-red$ sudo npm install path/to/y.tgz
npm ERR! path path/to/y.tgz/x.tgz
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall stat
npm ERR! ENOTDIR: not a directory, stat 'path/to/y.tgz/x.tgz'
According to the error log, y module is looking for x.tgz inside it. Then I checked the package.json
of y.tgz
artefact.
I can see it has x.tgz
as the dependency inside it, but it don't have x.tgz inside it.
"dependencies": {
"@abc/pqr": "file:x.tgz",
"ajv": "^6.5.1",
"debug": "^3.1.0"
}
According to the instructions, it should be fine if I install the x.tgz and then y.tgz. I could install these x
and y
some time back but now I cannot install it.
What might be the root cause for this issue? Is this npm and node versions related issue?