{"action":"created","issue":{"url":"https://api.github.com/repos/mhart/alpine-node/issues/26","repository_url":"https://api.github.com/repos/mhart/alpine-node","labels_url":"https://api.github.com/repos/mhart/alpine-node/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/mhart/alpine-node/issues/26/comments","events_url":"https://api.github.com/repos/mhart/alpine-node/issues/26/events","html_url":"https://github.com/mhart/alpine-node/issues/26","id":141708813,"number":26,"title":"Updating npm in 5.9 to allow production installs","user":{"login":"corbinu","id":533625,"avatar_url":"https://avatars.githubusercontent.com/u/533625?v=3","gravatar_id":"","url":"https://api.github.com/users/corbinu","html_url":"https://github.com/corbinu","followers_url":"https://api.github.com/users/corbinu/followers","following_url":"https://api.github.com/users/corbinu/following{/other_user}","gists_url":"https://api.github.com/users/corbinu/gists{/gist_id}","starred_url":"https://api.github.com/users/corbinu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corbinu/subscriptions","organizations_url":"https://api.github.com/users/corbinu/orgs","repos_url":"https://api.github.com/users/corbinu/repos","events_url":"https://api.github.com/users/corbinu/events{/privacy}","received_events_url":"https://api.github.com/users/corbinu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-17T21:15:58Z","updated_at":"2016-03-17T22:04:14Z","closed_at":"2016-03-17T22:04:14Z","body":"So I ran into this issue https://github.com/npm/npm/issues/11699 in version 5.8 and 5.9 of the container as node is still packaging npm 3.8.0 and this was fixed in 3.8.1.\r\n\r\nObviously I when I tried to update npm I ran into https://github.com/npm/npm/issues/9863\r\n\r\nHowever when I tried the solution there I could not install fs-extra into the npm directory due to\r\nhttps://github.com/npm/npm/issues/10686\r\n\r\nSo I finally came up with this line in my Dockerfile to update npm thought you might be interested in integrating it in to this container\r\n```\r\nnpm install fs-extra \\\r\n    && cp -r node_modules/* /usr/lib/node_modules/npm/node_modules \\\r\n    && sed -i s/graceful-fs/fs-extra/g /usr/lib/node_modules/npm/lib/utils/rename.js \\\r\n    && sed -i s/fs.rename/fs.move/g /usr/lib/node_modules/npm/lib/utils/rename.js \\\r\n    && rm -rf node_modules \\\r\n    && npm install -g npm@latest\r\n```"},"comment":{"url":"https://api.github.com/repos/mhart/alpine-node/issues/comments/198102893","html_url":"https://github.com/mhart/alpine-node/issues/26#issuecomment-198102893","issue_url":"https://api.github.com/repos/mhart/alpine-node/issues/26","id":198102893,"user":{"login":"mhart","id":367936,"avatar_url":"https://avatars.githubusercontent.com/u/367936?v=3","gravatar_id":"","url":"https://api.github.com/users/mhart","html_url":"https://github.com/mhart","followers_url":"https://api.github.com/users/mhart/followers","following_url":"https://api.github.com/users/mhart/following{/other_user}","gists_url":"https://api.github.com/users/mhart/gists{/gist_id}","starred_url":"https://api.github.com/users/mhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhart/subscriptions","organizations_url":"https://api.github.com/users/mhart/orgs","repos_url":"https://api.github.com/users/mhart/repos","events_url":"https://api.github.com/users/mhart/events{/privacy}","received_events_url":"https://api.github.com/users/mhart/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T22:04:14Z","updated_at":"2016-03-17T22:04:14Z","body":"Yeah, I'd prefer not to mess with the files of the globally installed npm in ppl's containers. Obviously I'd love to see https://github.com/npm/npm/issues/9863 fixed, but I'm not sure this is a good idea for everyone.\r\n\r\nGlad to know it's a relatively simple fix for people though! Hopefully if someone wants to do the same thing they'll stumble on this issue."}}