What I Wanted to Do
npm install --save ./lib/A-1.0.0.tgz
What Happened Instead
ENOENT: no such file or directory, stat ‘[PATH_TO_MODULE]\lib\A-1.0.0.tgz\lib\B-1.0.0.tgz’
Reproduction Steps
- Create a module (B).
-
npm pack
B - Create a module (A)
- Copy B-1.0.0.tgz to ./lib/B-1.0.0.tgz
-
npm install --save ./lib/B-1.0.0.tgz
in module A -
npm pack
A - Try to install A-1.0.0.tgz
Details
npm appears to treat the packed .tgz file as if it is a folder, thereby failing to find its local dependencies.
Platform Info
$ npm --versions
{ normalize: '1.0.0',
npm: '6.1.0',
ares: '1.13.0',
cldr: '32.0',
http_parser: '2.7.0',
icu: '60.1',
modules: '59',
nghttp2: '1.25.0',
node: '9.3.0',
openssl: '1.0.2n',
tz: '2017c',
unicode: '10.0',
uv: '1.18.0',
v8: '6.2.414.46-node.15',
zlib: '1.2.11' }
$ node -p process.platform
win32