-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ncu -g doesn't work on homebrew or windows #146
Comments
Thanks for reporting. Will you post your global packages? ( |
➜ ~ npm -g ls --depth=0
/usr/local/lib
├── bower@1.5.3
├── generator-angular@0.12.1
├── generator-gulp@0.2.0
├── generator-karma@1.0.0
├── grunt-cli@0.1.13
├── npm@2.14.8
├── npm-check-updates@2.3.0
├── strongloop@5.0.1
└── yo@1.4.8 ➜ ~ ncu -g
All global packages are up-to-date :) |
I have the same problem. |
same here.
|
Unfortunately I cannot reproduce on my machine:
|
i have this problem, since upgraded to node 4.2 from 0.12. |
Similar issues here:
Babel is out of date when I check NPM manually:
|
Any updates? ➜ ~ npm install -g less@1.0.5
/usr/local/lib
└── less@1.0.5
➜ ~ ncu -g --loglevel verbose
Initializing...
Running in global mode...
Getting installed packages...
Fetching latest versions...
All global packages are up-to-date :) Is there anything i can do to debug this ? |
Check this issue from |
@deepfriedmind nice this works :) $ PREFIX="/usr/local/" ncu -g
less 1.0.5 → 2.5.3 |
@deepfriedmind Good catch! Thanks! I will keep an eye on the aforementioned issues. When they are resolved I will incorporate their fix. |
@cebor Can you confirm that you have node installed via brew? |
$ which node
/usr/local/bin/node
$ brew info node
node: stable 5.0.0 (bottled), HEAD
Platform built on the V8 JavaScript runtime to build network applications
https://nodejs.org/
/usr/local/Cellar/node/5.0.0 (2824 files, 36M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/node.rb |
+1 |
I'm on Windows 10 (Node v5.1.0, NPM v3.5.1).
|
@glen-84 I added some more logging in |
@metaraine I've already updated the dependencies (except for I assume that you want to see the output while there is an expected update? |
Yes, that would be helpful if you're able. npm -g install tslint@3.0.0 # downgrade
ncu -g --loglevel silly |
Seems like it's not looking in the right place? |
Apparently not. When you run ncu in global mode, npm is initialized with |
But there are other users using OSX above? |
@glen-84 It was a homebrew issue for them (comment-155758303). Maybe it's a separate issue for Windows users. |
A slight variation:
And my global packages if this is helpful: (Using Node v5.1.0)
I've now manually updated all the packages using
|
@ntwb Thanks Stephen. This makes it pretty clear that npm.list is not working in global mode in some situations. How do you have node installed? Are you using Homebrew, nvm, Windows, ...? |
Try it now:
|
Node 5.1.0 installed via brew
|
Shoot. I don't know why it is reporting errors for nested dependencies when I am explicitly setting |
@G3z Is harvest a linked module? Because you have 0.2.0 installed, which doesn't appear to have been published. That explains the invalid error but not all the missing errors. Maybe ncu should ignore missing/invalid global dependencies. |
|
Does this have anything to do with the fact that there is an |
I'm kind of stumped :/ |
yes @metaraine harvest is a linked module |
I have the same problem, on OSX. Node is installed via the "n" module:
Adding PREFIX="/usr/local/" does not change the result. |
I just added an alias to my bash profile |
I have the same problem: http://prntscr.com/amslcf |
The problem indeed seems to be that the prefix path in the npm config is not setup correct when you have installed npm via homebrew (due to the symlinks created by homebrew), you can see the difference when you run in your terminal: You can verify the differences in the paths during the
then if you run the npm-check-updates command from the repository with
@metaraine I will send a PR with a fix for homebrew, will also look into @sidneys 's problem using the |
Automatically sets the correct node prefix path when node and npm are installed via homebrew, removes the need to prefix the command with `PREFIX=/usr/local`.
@nielsgl Thank you! That is awesome that you have looked into this. Much appreciated! I will comment here instead of on the pull request (#231) so that the conversations stays in one place. One thing I am concerned about is compatibility with nvm. I have node installed via nvm, so when I run |
@metaraine the pull request that I submitted shouldn't affect you, though I haven't tested it. I will install nvm and n tonight and see if they still work and if not how to fix it :) |
Terrific! Thanks! On Mon, Apr 25, 2016 at 9:42 AM Niels van Galen Last <
|
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. |
Great! Do you have changes to do from #163? |
@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. |
No problem, whenever you have a chance! It's much appreciated... thanks!
|
Fixes: ncu -g doesn't work on homebrew (#146)
the fix works, thx |
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
On my ubuntu machine all works fine!
The text was updated successfully, but these errors were encountered: