raineorshine / npm-check-updates

Find newer versions of package dependencies than what your package.json allows
Other
9.4k stars 326 forks source link

ncu -g doesn't work on homebrew or windows #146

Closed cebor closed 8 years ago

cebor commented 9 years ago

ncu -g always says that my deps are up to date, even when they are not!

node: 4.1.1 (brew) os: osx 10.11

$ ncu -g

All global packages are up-to-date :)

On my ubuntu machine all works fine!

nielsgl commented 8 years ago

Ok I installed nvm and added two node versions, and set 5.10.0 as the default

$ nvm ls
->      v5.10.0
         v5.11.0
         system
default -> v5.11.0

I checked that I am using the node and npm from nvm when I am in the npm-check-updates code base:

$ which node
/Users/niels/.nvm/versions/node/v5.10.0/bin/node
$ which npm
/Users/niels/.nvm/versions/node/v5.10.0/bin/npm

and I have globally npm version 3.8.3 installed (which is outdated):

$ npm -v
3.8.3

then testing the package for global updates shows the correct output:

$ ./bin/npm-check-updates -g
[INFO]: You can also use ncu as an alias

 npm  3.8.3  →  3.8.7

so it looks like my fix works correctly and fixes the homebrew issue and doesn't affect node and npm packages that have been installed with nvm.

raineorshine commented 8 years ago

Great! Do you have changes to do from #163?

nielsgl commented 8 years ago

@raineorshine no not yet, sorry had a busy week, but will look into the windows issue this weekend (don't have access to windows normally). If it is tricky I might submit a separate pr for it, so that one fixes the homebrew issue on osx and one for Windows.

raineorshine commented 8 years ago

No problem, whenever you have a chance! It's much appreciated... thanks! On Fri, Apr 29, 2016 at 11:46 AM Niels van Galen Last < notifications@github.com> wrote:

@raineorshine https://github.com/raineorshine no not yet, sorry had a busy week, but will look into the windows issue this weekend (don't have access to windows normally). If it is tricky I might submit a separate pr for it.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/tjunnone/npm-check-updates/issues/146#issuecomment-215827685

cebor commented 8 years ago

the fix works, thx

raineorshine commented 4 years ago

@nielsgl @cebor Any thoughts about #643? It's a PR that touches on the prefix code, and I'm hoping to avoid a regression.