I'm getting some rather unexpected behaviour when installing (a private) dependency.
For questions sake lets assume I have two packages:
{
"name": "Package_A",
....
"dependencies": {
"grunt": "~0.4.2",
"Package_B": ""
}
}
And
{
"name": "Package_B",
"scripts": {
"install": "grunt"
},
....
"dependencies": {
"grunt": "~0.4.2",
"grunt-contrib-clean": "~0.5.0"
}
}
Now when I run npm install on (a fresh) Package_A, Package_B installs with grunt-contrib-clean
as a dependency and runs grunt (which uses clean). It all works fine.
Now as soon as I add grunt-contrib-clean
to Package_A dependencies and run install (fresh copy again) fails.
the npm install script runs grunt, and grunt cannot find grunt-contrib-clean
:
Local Npm module "grunt-contrib-clean" not found. Is it installed?
I'm not really sure where to go from here. I was wondering if I'm having a similar issue to NPM doesn't install module dependencies. But I don't know enough about npm or grunt to tell.