{"action":"created","issue":{"url":"https://api.github.com/repos/tjunnone/npm-check-updates/issues/204","repository_url":"https://api.github.com/repos/tjunnone/npm-check-updates","labels_url":"https://api.github.com/repos/tjunnone/npm-check-updates/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/tjunnone/npm-check-updates/issues/204/comments","events_url":"https://api.github.com/repos/tjunnone/npm-check-updates/issues/204/events","html_url":"https://github.com/tjunnone/npm-check-updates/issues/204","id":131144740,"number":204,"title":"Directory permission error trying to upgrade package from 2.5.7 to 2.5.8","user":{"login":"jharris4","id":7042043,"avatar_url":"https://avatars.githubusercontent.com/u/7042043?v=3","gravatar_id":"","url":"https://api.github.com/users/jharris4","html_url":"https://github.com/jharris4","followers_url":"https://api.github.com/users/jharris4/followers","following_url":"https://api.github.com/users/jharris4/following{/other_user}","gists_url":"https://api.github.com/users/jharris4/gists{/gist_id}","starred_url":"https://api.github.com/users/jharris4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jharris4/subscriptions","organizations_url":"https://api.github.com/users/jharris4/orgs","repos_url":"https://api.github.com/users/jharris4/repos","events_url":"https://api.github.com/users/jharris4/events{/privacy}","received_events_url":"https://api.github.com/users/jharris4/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tjunnone/npm-check-updates/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-03T20:36:14Z","updated_at":"2016-02-04T01:09:16Z","closed_at":null,"body":"I just tried upgrading from 2.5.7 to 2.5.8 and I got the following error from npm:\r\n\r\nnpm ERR! Refusing to delete /usr/local/bin/npm-check-updates: ../lib/node_modules/npm-check-updates/bin/old-alias symlink target is not controlled by npm /usr/local\r\nnpm ERR! File exists: /usr/local/bin/npm-check-updates\r\n\r\nThe full output from npm is below, and I can provide the npm-debug.log as well if more detail is needed\r\n```\r\nnpm install -g npm-check-updates\r\n/usr/local/bin/ncu -> /usr/local/lib/node_modules/npm-check-updates/bin/ncu\r\n- lodash._arraycopy@3.0.0 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._arraycopy\r\n- lodash._arrayeach@3.0.0 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._arrayeach\r\n- lodash._basecopy@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._baseassign/node_modules/lodash._basecopy\r\n- lodash._baseassign@3.2.0 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._baseassign\r\n- lodash._basefor@3.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._basefor\r\n- lodash._baseclone@3.3.0 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone\r\n- lodash.istypedarray@3.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash._baseisequal/node_modules/lodash.istypedarray\r\n- lodash._baseisequal@3.0.7 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash._baseisequal\r\n- lodash.pairs@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash.pairs\r\n- lodash._basecallback@3.3.1 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback\r\n- lodash._isiterateecall@3.0.9 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._isiterateecall\r\n- lodash._basedifference@3.0.3 node_modules/npm-check-updates/node_modules/npm/node_modules/lodash.without/node_modules/lodash._basedifference\r\n- core-util-is@1.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is\r\n- isarray@0.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray\r\n- string_decoder@0.10.31 node_modules/npm-check-updates/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder\r\n- readable-stream@1.1.13 node_modules/npm-check-updates/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream\r\n- lodash._basetostring@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring\r\n- lodash.repeat@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat\r\n- lodash._createpadding@3.6.1 node_modules/npm-check-updates/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding\r\n- ansi@0.3.0 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/ansi\r\n- delegates@0.1.0 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates\r\n- core-util-is@1.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is\r\n- isarray@0.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray\r\n- string_decoder@0.10.31 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder\r\n- readable-stream@1.1.13 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream\r\n- are-we-there-yet@1.0.4 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/are-we-there-yet\r\n- lodash._basetostring@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring\r\n- lodash.repeat@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat\r\n- lodash._createpadding@3.6.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding\r\n- lodash.pad@3.1.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad\r\n- lodash._basetostring@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring\r\n- lodash.repeat@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat\r\n- lodash._createpadding@3.6.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding\r\n- lodash.padleft@3.1.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft\r\n- lodash._basetostring@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring\r\n- lodash.repeat@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat\r\n- lodash._createpadding@3.6.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding\r\n- lodash.padright@3.1.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright\r\n- gauge@1.2.2 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog/node_modules/gauge\r\n- npmlog@1.2.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-install-checks/node_modules/npmlog\r\n- core-util-is@1.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is\r\n- isarray@0.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray\r\n- process-nextick-args@1.0.3 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args\r\n- string_decoder@0.10.31 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder\r\n- util-deprecate@1.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate\r\n- readable-stream@2.0.4 node_modules/npm-check-updates/node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream\r\n- core-util-is@1.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is\r\n- isarray@0.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray\r\n- string_decoder@0.10.31 node_modules/npm-check-updates/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder\r\n- readable-stream@1.1.13 node_modules/npm-check-updates/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream\r\n- lodash._basetostring@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring\r\n- lodash.repeat@3.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat\r\n- lodash._createpadding@3.6.1 node_modules/npm-check-updates/node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding\r\n- core-util-is@1.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is\r\n- isarray@0.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray\r\n- process-nextick-args@1.0.6 node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args\r\n- string_decoder@0.10.31 node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder\r\n- util-deprecate@1.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate\r\n- readable-stream@2.0.4 node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream\r\n- assert-plus@0.1.5 node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus\r\n- core-util-is@1.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/core-util-is\r\n- isarray@0.0.1 node_modules/npm-check-updates/node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/isarray\r\n- process-nextick-args@1.0.3 node_modules/npm-check-updates/node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/process-nextick-args\r\n- string_decoder@0.10.31 node_modules/npm-check-updates/node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/string_decoder\r\n- util-deprecate@1.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/util-deprecate\r\n- readable-stream@2.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/sha/node_modules/readable-stream\r\n- spdx-license-ids@1.0.2 node_modules/npm-check-updates/node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-license-ids\r\n/usr/local/lib\r\n└── (empty)\r\n\r\nnpm ERR! Darwin 15.3.0\r\nnpm ERR! argv \"/usr/local/Cellar/node/5.5.0/bin/node\" \"/usr/local/bin/npm\" \"install\" \"-g\" \"npm-check-updates\"\r\nnpm ERR! node v5.5.0\r\nnpm ERR! npm  v3.5.3\r\nnpm ERR! path /usr/local/bin/npm-check-updates\r\nnpm ERR! code EEXIST\r\n\r\nnpm ERR! Refusing to delete /usr/local/bin/npm-check-updates: ../lib/node_modules/npm-check-updates/bin/old-alias symlink target is not controlled by npm /usr/local\r\nnpm ERR! File exists: /usr/local/bin/npm-check-updates\r\nnpm ERR! Move it away, and try again.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     /Users/username/Source/reduxboard/npm-debug.log\r\nnpm ERR! code 1\r\nUsernames-MacBook-Pro:reduxboard username$ npm install -g npm-check-updates\r\n/usr/local/bin/ncu -> /usr/local/lib/node_modules/npm-check-updates/bin/ncu\r\n/usr/local/lib\r\n└── (empty)\r\n\r\nnpm ERR! Darwin 15.3.0\r\nnpm ERR! argv \"/usr/local/Cellar/node/5.5.0/bin/node\" \"/usr/local/bin/npm\" \"install\" \"-g\" \"npm-check-updates\"\r\nnpm ERR! node v5.5.0\r\nnpm ERR! npm  v3.5.3\r\nnpm ERR! path /usr/local/bin/npm-check-updates\r\nnpm ERR! code EEXIST\r\n\r\nnpm ERR! Refusing to delete /usr/local/bin/npm-check-updates: ../lib/node_modules/npm-check-updates/bin/old-alias symlink target is not controlled by npm /usr/local\r\nnpm ERR! File exists: /usr/local/bin/npm-check-updates\r\nnpm ERR! Move it away, and try again.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     /Users/username/Source/reduxboard/npm-debug.log\r\nnpm ERR! code 1\r\n```"},"comment":{"url":"https://api.github.com/repos/tjunnone/npm-check-updates/issues/comments/179559540","html_url":"https://github.com/tjunnone/npm-check-updates/issues/204#issuecomment-179559540","issue_url":"https://api.github.com/repos/tjunnone/npm-check-updates/issues/204","id":179559540,"user":{"login":"justinhelmer","id":1403438,"avatar_url":"https://avatars.githubusercontent.com/u/1403438?v=3","gravatar_id":"","url":"https://api.github.com/users/justinhelmer","html_url":"https://github.com/justinhelmer","followers_url":"https://api.github.com/users/justinhelmer/followers","following_url":"https://api.github.com/users/justinhelmer/following{/other_user}","gists_url":"https://api.github.com/users/justinhelmer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinhelmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinhelmer/subscriptions","organizations_url":"https://api.github.com/users/justinhelmer/orgs","repos_url":"https://api.github.com/users/justinhelmer/repos","events_url":"https://api.github.com/users/justinhelmer/events{/privacy}","received_events_url":"https://api.github.com/users/justinhelmer/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T01:09:15Z","updated_at":"2016-02-04T01:09:15Z","body":"@jharris4 - Personally, I prefer to install `node` and `npm` separately, i.e.:\r\n\r\n```bash\r\nbrew install node012 --without-npm # skipping npm so we can install it with custom configuration\r\nbrew link node012 &>/dev/null\r\n\r\n# install npm, and configure it to install global node modules in the home dir (so we dont have to sudo for global node modules)\r\necho prefix=~/.node >> ~/.npmrc\r\ncurl -L https://www.npmjs.com/install.sh | sh\r\n```\r\n\r\nYou may have success with avoiding this type of thing in the future for globally-installed `npm` modules that require deleting existing files during the process of an update.\r\n\r\nPersonally, this method has worked well for me.\r\n\r\n@metaraine - I think we can safely wrap this one up."}}