Created
February 2, 2013 02:05
-
-
Save jzwinck/4695723 to your computer and use it in GitHub Desktop.
Test case for npm install of a module, then something that depends on it, then remove the first and try to fix up the second. It doesn't work well as of this writing (node.js 0.8.18).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eux | |
cat <<EOF >package.json | |
{ | |
"name": "npm-install-order-test", | |
"private": true, | |
"version": "0.0.0", | |
"dependencies" : { | |
"express" : "*" | |
} | |
} | |
EOF | |
npm install connect # first, explicitly install an indirect dependency | |
npm install # should install express, but won't install connect again | |
rm -r node_modules/connect # changed our mind, remove the connect we installed | |
npm install # should recognize that express is now missing a dependency | |
# now we have a non-working installation of express |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment