- Create a folder called
npm-testand placepackage.jsonin there. cd npm-testnpm installls node_modules. Observe thatlodashandrqueryfolders are there.- Open
package.json, changerqueryversion from^2.0.8to^3.1.1. - run
npm installto update packages. - Observe that this line gets printed out after running
npm install:lodash@3.10.1 node_modules/lodash -> node_modules/rquery/node_modules/lodash ls node_modules. Observe thatlodashis no longer there. This makes any code in the project that runsrequire('lodash')break. (ex:node test.jsusing thetest.jsfile in this gist)- Run
npm installagain, look atnode_modulesand observe thatlodashis back there.
Last active
May 19, 2016 12:47
-
-
Save joannecheng/f7fe51d162b5b2fd843d to your computer and use it in GitHub Desktop.
npm issue?
This file contains hidden or 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
| { | |
| "name": "npm-test", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "ISC", | |
| "dependencies": { | |
| "lodash": "^3.10.1", | |
| "rquery": "^2.0.8" | |
| } | |
| } |
This file contains hidden or 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
| /* run `node test.js` */ | |
| require('lodash') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment