{"action":"opened","issue":{"url":"https://api.github.com/repos/npm/npm/issues/17059","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/17059/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/17059/comments","events_url":"https://api.github.com/repos/npm/npm/issues/17059/events","html_url":"https://github.com/npm/npm/issues/17059","id":234234078,"number":17059,"title":"NODE_ENV=production does not install devDependencies of a dep with `prepare`","user":{"login":"intellix","id":1162531,"avatar_url":"https://avatars0.githubusercontent.com/u/1162531?v=3","gravatar_id":"","url":"https://api.github.com/users/intellix","html_url":"https://github.com/intellix","followers_url":"https://api.github.com/users/intellix/followers","following_url":"https://api.github.com/users/intellix/following{/other_user}","gists_url":"https://api.github.com/users/intellix/gists{/gist_id}","starred_url":"https://api.github.com/users/intellix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intellix/subscriptions","organizations_url":"https://api.github.com/users/intellix/orgs","repos_url":"https://api.github.com/users/intellix/repos","events_url":"https://api.github.com/users/intellix/events{/privacy}","received_events_url":"https://api.github.com/users/intellix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-07T14:43:16Z","updated_at":"2017-06-07T14:43:16Z","closed_at":null,"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  - [ ] 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\nAdding a `prepare` script in npm5 states that it will install devDependencies of the package and run that script. If you have NODE_ENV set to production then it does not actually install dev dependencies and building of that dependency will fail. Probably spent about 8hrs trying to figure out why my dist folder didn't exist on Heroku :)\r\n\r\n#### How can the CLI team reproduce the problem?\r\n1) Depend on a package that has devDependencies and builds based on those\r\n2) Run the following:\r\n```\r\nexport NODE_ENV=production\r\nnpm i\r\n```\r\n\r\n### supporting information:\r\n\r\n - `npm -v` prints: 5.0.3\r\n - `node -v` prints: 8.0.0\r\n - `npm config get registry` prints: https://registry.npmjs.org/\r\n - Windows, OS X/macOS, or Linux?: Linux or macOS\r\n - Network issues:\r\n   - Geographic location where npm was run:\r\n   - [ ] I use a proxy to connect to the npm registry.\r\n   - [ ] I use a proxy to connect to the web.\r\n   - [ ] I use a proxy when downloading Git repos.\r\n   - [ ] I access the npm registry via a VPN\r\n   - [ ] I don't use a proxy, but have limited or unreliable internet access.\r\n - Container:\r\n   - [ ] I develop using Vagrant on Windows.\r\n   - [ ] I develop using Vagrant on OS X or Linux.\r\n   - [ ] I develop / deploy using Docker.\r\n   - [x] I deploy to a PaaS (Triton, Heroku).\r\n"}}
{"actor":{"display_login":"intellix"}}