{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/19356","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/19356/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/19356/comments","events_url":"https://api.github.com/repos/npm/npm/issues/19356/events","html_url":"https://github.com/npm/npm/issues/19356","id":280478011,"number":19356,"title":"npm prune --only=production is removing packages installed with git","user":{"login":"jsynowiec","id":1029142,"avatar_url":"https://avatars0.githubusercontent.com/u/1029142?v=4","gravatar_id":"","url":"https://api.github.com/users/jsynowiec","html_url":"https://github.com/jsynowiec","followers_url":"https://api.github.com/users/jsynowiec/followers","following_url":"https://api.github.com/users/jsynowiec/following{/other_user}","gists_url":"https://api.github.com/users/jsynowiec/gists{/gist_id}","starred_url":"https://api.github.com/users/jsynowiec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsynowiec/subscriptions","organizations_url":"https://api.github.com/users/jsynowiec/orgs","repos_url":"https://api.github.com/users/jsynowiec/repos","events_url":"https://api.github.com/users/jsynowiec/events{/privacy}","received_events_url":"https://api.github.com/users/jsynowiec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-08T12:44:31Z","updated_at":"2017-12-09T00:00:36Z","closed_at":null,"author_association":"NONE","body":"#### I'm opening this issue because:\r\n\r\n  - [ ] npm is crashing.\r\n  - [x] npm is producing an incorrect install.\r\n  - [x] npm is doing something I don't understand.\r\n  - [ ] Other (_see below for feature requests_):\r\n\r\n#### What's going wrong?\r\n\r\nPackages present under the `dependencies` in the `package.json` file that were installed using git/github package links, e.g. `github:npm/npm#some-tag` are being uninstalled when `npm prune --only=production` is executed.\r\n\r\n#### How can the CLI team reproduce the problem?\r\n\r\n1. Install a package using standard syntax, save it as a dependency,\r\n2. Install another a package using `git+<proto>:`, `git://` or `github:` format, save it as dependency.\r\n3. Run `npm prune --only=production`\r\n\r\nExpected: Second package is present.\r\nActual: Second package is missing.\r\n\r\n### supporting information:\r\n\r\n - `npm -v` prints: 5.6.0\r\n - `node -v` prints: 8.9.1\r\n - `npm config get registry` prints: https://registry.npmjs.org/\r\n - Windows, OS X/macOS, or Linux?: macOS\r\n - Network issues (unrelated)\r\n\r\n### additional information:\r\n\r\nWorkaround - When a tarball url is used, the package is not removed on prune."},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/350402602","html_url":"https://github.com/npm/npm/issues/19356#issuecomment-350402602","issue_url":"https://api.github.com/repos/npm/npm/issues/19356","id":350402602,"user":{"login":"iarna","id":983798,"avatar_url":"https://avatars1.githubusercontent.com/u/983798?v=4","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":"2017-12-09T00:00:36Z","updated_at":"2017-12-09T00:00:36Z","author_association":"OWNER","body":"`--only=production` is not required to reproduce this."}}
{"actor":{"display_login":"iarna"}}