{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/15069","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/15069/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/15069/comments","events_url":"https://api.github.com/repos/npm/npm/issues/15069/events","html_url":"https://github.com/npm/npm/issues/15069","id":192507315,"number":15069,"title":"`npm prune` removes dependencies it shouldn't","user":{"login":"Moeriki","id":38758,"avatar_url":"https://avatars.githubusercontent.com/u/38758?v=3","gravatar_id":"","url":"https://api.github.com/users/Moeriki","html_url":"https://github.com/Moeriki","followers_url":"https://api.github.com/users/Moeriki/followers","following_url":"https://api.github.com/users/Moeriki/following{/other_user}","gists_url":"https://api.github.com/users/Moeriki/gists{/gist_id}","starred_url":"https://api.github.com/users/Moeriki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Moeriki/subscriptions","organizations_url":"https://api.github.com/users/Moeriki/orgs","repos_url":"https://api.github.com/users/Moeriki/repos","events_url":"https://api.github.com/users/Moeriki/events{/privacy}","received_events_url":"https://api.github.com/users/Moeriki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-30T08:47:51Z","updated_at":"2016-11-30T14:56:53Z","closed_at":null,"body":"#### I'm opening this issue because:\r\n\r\n  - npm is producing an incorrect install.\r\n  - npm is doing something I don't understand.\r\n\r\n#### What's going wrong?\r\n\r\n`npm prune` removes dependencies (I think) it shouldn't.\r\n\r\n#### How can the CLI team reproduce the problem?\r\n\r\n```shell\r\ngit clone git@github.com:Moeriki/jest-test.git\r\ncd jest-test\r\nnpm install\r\nnpm test # succeeds\r\nnpm prune\r\nnpm test # fails because missing dependencies\r\n```\r\n\r\nWhy does npm removes packages it just deemed necessary to install?\r\n\r\n### supporting information:\r\n\r\n - `npm -v` prints: `3.10.10` / `4.0.2`\r\n - `node -v` prints: `4.6.2` / `6.9.1` // reproducible across these node / npm versions\r\n - `npm config get registry` prints: https://registry.npmjs.org/\r\n - Windows, OS X/macOS, or Linux?: OS X 10.12.1\r\n - Geographic location where npm was run: Belgium\r\n - ~Network issues~\r\n - ~Container~\r\n\r\nReferences:\r\n* [4573](https://github.com/npm/npm/issues/4573) may be related\r\n* [9889](https://github.com/npm/npm/issues/9889) may be related\r\n* [jest/2181](https://github.com/facebook/jest/issues/2181) original report"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/263893734","html_url":"https://github.com/npm/npm/issues/15069#issuecomment-263893734","issue_url":"https://api.github.com/repos/npm/npm/issues/15069","id":263893734,"user":{"login":"KenanY","id":733364,"avatar_url":"https://avatars.githubusercontent.com/u/733364?v=3","gravatar_id":"","url":"https://api.github.com/users/KenanY","html_url":"https://github.com/KenanY","followers_url":"https://api.github.com/users/KenanY/followers","following_url":"https://api.github.com/users/KenanY/following{/other_user}","gists_url":"https://api.github.com/users/KenanY/gists{/gist_id}","starred_url":"https://api.github.com/users/KenanY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KenanY/subscriptions","organizations_url":"https://api.github.com/users/KenanY/orgs","repos_url":"https://api.github.com/users/KenanY/repos","events_url":"https://api.github.com/users/KenanY/events{/privacy}","received_events_url":"https://api.github.com/users/KenanY/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T14:56:53Z","updated_at":"2016-11-30T14:56:53Z","body":"<http://facebook.github.io/jest/docs/configuration.html> leads me to believe that tests should be, by default, in a `__tests__/` directory, which is not the case here? I'm not familiar with Jest but maybe you have some sort of config that I don't, somehow?"}}
{"actor":{"display_login":"KenanY"}}