I wrote a library using grunt to build itself. Let's call it L.
I wrote a project using grunt to build itself, and using L as a dependency. Let's call it P.
Both L and P are using the same grunt plugin. Let's call it G.
Because npm does install a library just once in a node_modules tree, here is the hierarchy of the P project after running npm install:
./P
./P/node_modules
./P/node_modules/G
./P/node_modules/L
But there is no ./P/node_modules/L/node_modules/G and that makes grunt fail to build L.
Why is grunt searching for a ./node_modules/<plugin>/package.json file instead of just requiring it like any other node module?
I wrote a library using grunt to build itself. Let's call it L.
I wrote a project using grunt to build itself, and using L as a dependency. Let's call it P.
Both L and P are using the same grunt plugin. Let's call it G.
Because npm does install a library just once in a node_modules tree, here is the hierarchy of the P project after running
npm install:But there is no
./P/node_modules/L/node_modules/Gand that makes grunt fail to build L.Why is grunt searching for a
./node_modules/<plugin>/package.jsonfile instead of just requiring it like any other node module?