-
Notifications
You must be signed in to change notification settings - Fork 3k
npm install doesn't wait for dependencies to be installed #6170
Comments
We believe that this issue has been addressed in |
@othiym23 This error still occurs with npm@1.4.28 and npm@2.0.0:
|
Sorry for the hair trigger, @jbuck – we've been cleaning out a bunch of issues related #6043 and press-ganged yours prematurely. I'm actually not sure what the right thing to do in your case is. Is there a reason you're depending on bower directly? (I'm assuming that there is, and you're using a reduced |
Sorry, I left one part out of my example. I'm fine with putting bower in as a peerDependency to ensure that it's installed before the postinstall script is run, but I think that should be documented somewhere as a valid use case for peerDependency. I guess it's just weird how the dependency chain is changed when you run npm install in a-poor-app vs filer. |
It's definitely weird, and it's something that npm should handle better than it does. I'm going to add this to the |
Great thread. has there been any movement on this, or is the |
@drvanhalen The behavior @jbuck is seeing is a bug, but my hope is that multi-stage install / |
@othiym23 thanks very much. |
+1 |
This'll be solved by #6926, so I'm going to close this ticket and further discussion should occur over there. |
We found a bug over in filerjs/filer#285 where if you have a dependency (bower in this case) listed in your root package.json as well as another dependency's package.json (filer in this case), it's very easy to hit a race condition where the filer postinstall would fail because npm wouldn't wait for bower to be installed in the root.
STR create a package.json with the following content:
Then run
npm install; echo "*************************** noooooooooooooo npm install why aren't you patient **************************"; npm install
and receive the following output:The text was updated successfully, but these errors were encountered: