{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/9689","labels_url":"https://api.github.com/repos/npm/npm/issues/9689/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/9689/comments","events_url":"https://api.github.com/repos/npm/npm/issues/9689/events","html_url":"https://github.com/npm/npm/issues/9689","id":107477852,"number":9689,"title":"Dependencies from symlinked dependencies aren't used","user":{"login":"donaldpipowitch","id":1152805,"avatar_url":"https://avatars.githubusercontent.com/u/1152805?v=3","gravatar_id":"","url":"https://api.github.com/users/donaldpipowitch","html_url":"https://github.com/donaldpipowitch","followers_url":"https://api.github.com/users/donaldpipowitch/followers","following_url":"https://api.github.com/users/donaldpipowitch/following{/other_user}","gists_url":"https://api.github.com/users/donaldpipowitch/gists{/gist_id}","starred_url":"https://api.github.com/users/donaldpipowitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donaldpipowitch/subscriptions","organizations_url":"https://api.github.com/users/donaldpipowitch/orgs","repos_url":"https://api.github.com/users/donaldpipowitch/repos","events_url":"https://api.github.com/users/donaldpipowitch/events{/privacy}","received_events_url":"https://api.github.com/users/donaldpipowitch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/bug","name":"bug","color":"C40233"},{"url":"https://api.github.com/repos/npm/npm/labels/support","name":"support","color":"FF91AF"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/npm/npm/milestones/21","html_url":"https://github.com/npm/npm/milestones/3.x","labels_url":"https://api.github.com/repos/npm/npm/milestones/21/labels","id":1171864,"number":21,"title":"3.x","description":"","creator":{"login":"iarna","id":983798,"avatar_url":"https://avatars.githubusercontent.com/u/983798?v=3","gravatar_id":"","url":"https://api.github.com/users/iarna","html_url":"https://github.com/iarna","followers_url":"https://api.github.com/users/iarna/followers","following_url":"https://api.github.com/users/iarna/following{/other_user}","gists_url":"https://api.github.com/users/iarna/gists{/gist_id}","starred_url":"https://api.github.com/users/iarna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iarna/subscriptions","organizations_url":"https://api.github.com/users/iarna/orgs","repos_url":"https://api.github.com/users/iarna/repos","events_url":"https://api.github.com/users/iarna/events{/privacy}","received_events_url":"https://api.github.com/users/iarna/received_events","type":"User","site_admin":false},"open_issues":81,"closed_issues":31,"state":"open","created_at":"2015-06-19T05:57:33Z","updated_at":"2015-09-22T15:10:43Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-09-21T09:47:11Z","updated_at":"2015-09-22T15:14:43Z","closed_at":null,"body":"Hi, I'm using npm@3.3.3. I'm not sure if this was true for npm@2, but this is the first time I see it:\r\n\r\nSay I have `module-a` in version `1.0.0` and `module-a` has a dependency to `module-b` in version `1.0.0`. I install `module-a` in my project `foo` and get this:\r\n\r\n````\r\nfoo/\r\nfoo/node_modules/module-a # 1.0.0\r\nfoo/node_modules/module-b # 1.0.0\r\n````\r\n\r\nI develop `module-a` locally and change its dependency to `module-b` to version `1.1.0`. Now I `$ npm link module-a` and call `npm i` in `foo`. I'd expect to get this:\r\n\r\n````\r\nfoo/\r\nfoo/node_modules/module-a # 1.0.0, symlinked\r\nfoo/node_modules/module-b # 1.1.0\r\n````\r\n\r\nBut it looks I get this:\r\n\r\n\r\n````\r\nfoo/\r\nfoo/node_modules/module-a # 1.0.0, symlinked\r\nfoo/node_modules/module-b # 1.0.0\r\n````\r\nIs this a bug?"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/142320272","html_url":"https://github.com/npm/npm/issues/9689#issuecomment-142320272","issue_url":"https://api.github.com/repos/npm/npm/issues/9689","id":142320272,"user":{"login":"iarna","id":983798,"avatar_url":"https://avatars.githubusercontent.com/u/983798?v=3","gravatar_id":"","url":"https://api.github.com/users/iarna","html_url":"https://github.com/iarna","followers_url":"https://api.github.com/users/iarna/followers","following_url":"https://api.github.com/users/iarna/following{/other_user}","gists_url":"https://api.github.com/users/iarna/gists{/gist_id}","starred_url":"https://api.github.com/users/iarna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iarna/subscriptions","organizations_url":"https://api.github.com/users/iarna/orgs","repos_url":"https://api.github.com/users/iarna/repos","events_url":"https://api.github.com/users/iarna/events{/privacy}","received_events_url":"https://api.github.com/users/iarna/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T15:14:42Z","updated_at":"2015-09-22T15:14:42Z","body":"That behavior is what I would expect. Ideally we'd ditch module-b@1.0.0, however. But if you run `npm prune` it should go away.\r\n\r\nSpecifically, when you run `npm link module-a`, npm installs a fresh copy globally, and then that is linked into your tree. Global installs need to be independent, so they have all of their dependencies installed with them. When it was then linked back into your tree, it no longer had any need of the `module-b@1.0.0` dep sitting there."}}