NPM Local Path (Dependency) Transitive Dependency Omitted?

Viewed 169

I use a very simple NPM project with a chain with one local dependency that has its own dependency (regular package fs-extra).

root -> file:../local-dependency -> fs-extra

Very strange things happen (NPM version 6.14.8) when I run npm install, I recognized that when:

a) local dependency (of root) points to parent or "higher" directory (e.g. file:../local-dependency), its transitive dependencies (fs-extra) are NOT installed to node_modules of root

b) local dependency (of root) points to the directory on same level as root (file:./local-dependency), its transitive dependencies (fs-extra) are installed to node_modules of root

Is this something normal or is it a (known) bug? Current behavior seems very strange to me.

0 Answers
Related