Skip to content
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

Closed
cebor opened this issue Oct 5, 2015 · 56 comments
Closed

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

cebor opened this issue Oct 5, 2015 · 56 comments
Labels

Comments

@cebor
Copy link

cebor commented Oct 5, 2015

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!

@cebor cebor changed the title ncu -g don't work! ncu -g don't work on osx! Oct 5, 2015
@raineorshine
Copy link
Owner

Thanks for reporting. Will you post your global packages? (npm -g ls --depth=0)

@cebor
Copy link
Author

cebor commented Oct 13, 2015

~  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 :)

@ghost
Copy link

ghost commented Oct 16, 2015

I have the same problem.

@osahner
Copy link

osahner commented Oct 22, 2015

same here.

npm -g list --dept=0
/usr/local/lib
...
├── clean-css@3.4.5
...
├── npm@3.3.9
├── npm-check-updates@2.3.3
...
npm show clean-css version
3.4.6
ncu -g

All global packages are up-to-date :)

uname -a
Darwin ***.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64

brew --version
0.9.5 (git revision 91b03; last commit 2015-10-21)

@raineorshine
Copy link
Owner

Unfortunately I cannot reproduce on my machine:

$ ncu -g

 clean-css   3.4.5  →   3.4.6 
 npm        2.14.4  →   3.3.9 

$ uname -a
Darwin ***.local 13.1.0 Darwin Kernel Version 13.1.0: Wed Apr  2 23:52:02 PDT 2014; root:xnu-2422.92.1~2/RELEASE_X86_64 x86_64

@cebor
Copy link
Author

cebor commented Oct 24, 2015

i have this problem, since upgraded to node 4.2 from 0.12.

@obsoke
Copy link

obsoke commented Oct 24, 2015

Similar issues here:

$ npm -g ls --depth=0
/usr/local/lib
├── babel@5.8.23
├── bower@1.5.3
├── browserify@11.2.0
├── eslint@1.6.0
├── eslint-plugin-babel@2.1.1
├── eslint-plugin-react@3.5.1
├── gulp@3.9.0
├── node-inspector@0.12.3
├── npm@2.14.7
├── npm-check-updates@2.3.4
├── tern@0.15.0
├── watchify@3.4.0
├── webpack@1.12.2
└── webpack-dev-server@1.12.1

Babel is out of date when I check NPM manually:

$ npm info babel | grep version
  versions:
  version: '5.8.29',
$ ncu -g

All global packages are up-to-date :)

@cebor
Copy link
Author

cebor commented Nov 11, 2015

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 ?

@deepfriedmind
Copy link

Check this issue from npm-check which is a similar module: dylang/npm-check#53

@cebor
Copy link
Author

cebor commented Nov 11, 2015

@deepfriedmind nice

this works :)

$ PREFIX="/usr/local/" ncu -g

 less  1.0.5  →  2.5.3

@raineorshine
Copy link
Owner

@deepfriedmind Good catch! Thanks!

I will keep an eye on the aforementioned issues. When they are resolved I will incorporate their fix.

@raineorshine
Copy link
Owner

@cebor Can you confirm that you have node installed via brew?

@cebor
Copy link
Author

cebor commented Nov 11, 2015

@metaraine

$ 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

@G3z
Copy link

G3z commented Nov 24, 2015

+1

@glen-84
Copy link

glen-84 commented Dec 1, 2015

I'm on Windows 10 (Node v5.1.0, NPM v3.5.1).

$ ncu -g
Warning: .settle() is deprecated and will be removed in a future version. Use .reflect() instead.
    at Object.getLatestVersions (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\lib\versionmanager.js:306:20)
    at upgradePackageDefinitions (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:107:15)
    at C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:125:20
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at analyzeGlobalPackages (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:123:10)
    at programRunGlobal (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:331:12)
    at programRun (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:322:29)
    at doNTCallback0 (node.js:430:9)
    at process._tickCallback (node.js:359:13)
From previous event:
    at Object.module.exports._.merge.run (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:403:12)
    at Object.<anonymous> (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\bin\npm-check-updates:38:5)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Function.Module.runMain (module.js:457:10)
    at startup (node.js:138:18)
    at node.js:974:3


All global packages are up-to-date :)
$ npm outdated -g
Package     Current  Wanted  Latest  Location
gulp-cli      0.4.0     git     git
tslint        3.0.0   3.1.1   3.1.1
typescript    1.6.2   1.7.3   1.7.3

@raineorshine
Copy link
Owner

@glen-84 I added some more logging in v2.5.2. Will you npm install -g npm-check-updates@latest and post the output from ncu -g --loglevel silly?

@glen-84
Copy link

glen-84 commented Dec 2, 2015

@metaraine I've already updated the dependencies (except for gulp-cli, but that's Git which I don't think that NCU lists anyway).

I assume that you want to see the output while there is an expected update?

@raineorshine
Copy link
Owner

Yes, that would be helpful if you're able.

npm -g install tslint@3.0.0 # downgrade
ncu -g --loglevel silly

@glen-84
Copy link

glen-84 commented Dec 2, 2015

$ ncu -g --loglevel silly
Initializing...
Running in global mode...
Getting installed packages...
{ npm: '3.5.1' }

Fetching latest versions...
{ npm: '3.5.0' }

All global packages are up-to-date :)

Seems like it's not looking in the right place?

@raineorshine
Copy link
Owner

Apparently not. When you run ncu in global mode, npm is initialized with global: true, which on my machine (OSX) makes it check the globally installed dependencies. I wonder if using npm programmatically on Windows does not give the correct behavior. I could try spawning npm from the shell instead of using npm programmatically when running the list command to get the installed dependencies.

@glen-84
Copy link

glen-84 commented Dec 2, 2015

But there are other users using OSX above?

@raineorshine
Copy link
Owner

@glen-84 It was a homebrew issue for them (comment-155758303). Maybe it's a separate issue for Windows users.

@ntwb
Copy link

ntwb commented Dec 3, 2015

A slight variation:

$ ncu -g --loglevel silly
Initializing...
Running in global mode...
Getting installed packages...
{}

Fetching latest versions...
{}

All global packages are up-to-date :)

And my global packages if this is helpful: (Using Node v5.1.0)

$ npm list -g --depth=0
/usr/local/lib
├── bower@1.5.2
├── csslint@0.10.0
├── cssstats@2.1.2
├── doiuse@2.2.0
├── eslint@1.5.0
├── grizzly@1.0.14
├── grunt@0.4.5
├── grunt-cli@0.1.13
├── impromptu@0.2.6
├── jscs@2.1.1
├── jshint@2.8.0
├── npm@3.3.12
├── npm-check-updates@2.5.2
├── pageres-cli@1.1.1
├── postcss@5.0.12
├── postcss-cli@2.0.0
├── postcss-reporter@1.1.0
├── pretty-diff@0.3.1
├── stylehacks@2.2.0
├── stylelint@2.3.5
├── svg2png-command@1.0.2
└── xo@0.11.2

I've now manually updated all the packages using npm update -g package:

$ npm list -g --depth=0
/usr/local/lib
├── bower@1.6.8
├── csslint@0.10.0
├── cssstats@2.1.2
├── doiuse@2.2.0
├── eslint@1.10.3
├── grizzly@1.0.15
├── grunt@0.4.5
├── grunt-cli@0.1.13
├── impromptu@0.2.6
├── jscs@2.6.0
├── jshint@2.8.0
├── npm@3.3.12
├── npm-check-updates@2.5.2
├── postcss@5.0.12
├── postcss-cli@2.3.2
├── postcss-reporter@1.3.0
├── pretty-diff@0.4.1
├── stylehacks@2.2.0
├── stylelint@2.3.5
├── svg2png-command@1.0.2
└── xo@0.11.2

@raineorshine
Copy link
Owner

@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, ...?

@raineorshine
Copy link
Owner

Try it now:

$ npm install -g npm-check-updates@2.5.4-spawnglobal

@G3z
Copy link

G3z commented Dec 6, 2015

Node 5.1.0 installed via brew
OsX El Capitain

~|⇒ npm install -g npm-check-updates@2.5.4-spawnglobal
/usr/local/bin/npm-check-updates -> /usr/local/lib/node_modules/npm-check-updates/bin/old-alias
/usr/local/bin/ncu -> /usr/local/lib/node_modules/npm-check-updates/bin/npm-check-updates
/usr/local/lib
└── npm-check-updates@2.5.4-spawnglobal
~|⇒ ncu -g
Unhandled rejection npm ERR! missing: node-pre-gyp@^0.6.15, required by fsevents@1.0.5
npm ERR! missing: npmlog@, required by npm-registry-client@7.0.7
npm ERR! invalid: npmlog@1.2.1 /usr/local/lib/node_modules/check-build/node_modules/nsp/node_modules/silent-npm-registry-client/node_modules/npm-registry-client/node_modules/npmlog
npm ERR! invalid: readable-stream@2.0.3 /usr/local/lib/node_modules/db-migrate/node_modules/mongodb/node_modules/readable-stream
npm ERR! missing: node-pre-gyp@^0.6.15, required by fsevents@1.0.5
npm ERR! missing: npmlog@, required by npm-registry-client@7.0.7
npm ERR! missing: npmlog@, required by npm-registry-client@7.0.7
npm ERR! invalid: pm2-axon@2.0.8 /usr/local/lib/node_modules/pm2/node_modules/pm2-axon
npm ERR! invalid: pm2-deploy@0.2.1 /usr/local/lib/node_modules/pm2/node_modules/pm2-deploy
npm ERR! invalid: pmx@0.5.5 /usr/local/lib/node_modules/pm2/node_modules/pmx
npm ERR! invalid: vizion@0.2.11 /usr/local/lib/node_modules/pm2/node_modules/vizion
npm ERR! missing: react-tools@git://github.com/facebook/react.git#b4e74e38e43ac53af8acd62c78c9213be0194245, required by react-native@0.13.2
npm ERR! missing: chokidar@^1.0.0, required by babel@5.8.29
npm ERR! missing: convert-source-map@^1.1.0, required by babel@5.8.29
npm ERR! missing: brace-expansion@^1.0.0, required by minimatch@3.0.0
npm ERR! missing: xtend@^4.0.0, required by output-file-sync@1.1.1
npm ERR! missing: babylon@^5.8.29, required by babel-core@5.8.33
npm ERR! missing: convert-source-map@^1.1.0, required by babel-core@5.8.33
npm ERR! missing: core-js@^1.0.0, required by babel-core@5.8.33
npm ERR! missing: fs-readdir-recursive@^0.1.0, required by babel-core@5.8.33
npm ERR! missing: lodash@^3.10.0, required by babel-core@5.8.33
npm ERR! missing: output-file-sync@^1.1.0, required by babel-core@5.8.33
npm ERR! missing: path-exists@^1.0.0, required by babel-core@5.8.33
npm ERR! missing: slash@^1.0.0, required by babel-core@5.8.33
npm ERR! missing: lodash@^3.9.3, required by babel-plugin-proto-to-assign@1.0.4
npm ERR! missing: number-is-nan@^1.0.0, required by is-finite@1.0.1
npm ERR! missing: commoner@~0.10.3, required by regenerator@0.8.40
npm ERR! missing: defs@~1.1.0, required by regenerator@0.8.40
npm ERR! missing: esprima-fb@~15001.1001.0-dev-harmony-fb, required by regenerator@0.8.40
npm ERR! missing: recast@0.10.33, required by regenerator@0.8.40
npm ERR! missing: through@~2.3.8, required by regenerator@0.8.40
npm ERR! missing: recast@^0.10.10, required by regexpu@1.3.0
npm ERR! missing: is-finite@^1.0.0, required by repeating@1.1.3
npm ERR! missing: amdefine@>=0.0.4, required by source-map@0.1.32
npm ERR! missing: type-is@~1.6.6, required by connect@2.30.2
npm ERR! missing: raw-body@~2.1.2, required by body-parser@1.13.3
npm ERR! missing: type-is@~1.6.6, required by body-parser@1.13.3
npm ERR! missing: mime-types@~2.1.6, required by accepts@1.2.13
npm ERR! missing: ms@0.7.1, required by connect-timeout@1.6.2
npm ERR! missing: uid-safe@~2.0.0, required by csrf@3.0.0
npm ERR! missing: accepts@~1.2.12, required by errorhandler@1.4.2
npm ERR! missing: base64-url@1.2.1, required by uid-safe@2.0.0
npm ERR! missing: escape-html@1.0.2, required by finalhandler@0.4.0
npm ERR! missing: on-finished@~2.3.0, required by finalhandler@0.4.0
npm ERR! missing: vary@~1.0.1, required by method-override@2.3.5
npm ERR! missing: on-finished@~2.3.0, required by morgan@1.6.1
npm ERR! missing: inherits@~2.0.1, required by readable-stream@1.1.13
npm ERR! missing: ms@0.7.1, required by serve-favicon@2.3.0
npm ERR! missing: accepts@~1.2.12, required by serve-index@1.7.2
npm ERR! missing: escape-html@1.0.2, required by serve-index@1.7.2
npm ERR! missing: mime-db@~1.19.0, required by mime-types@2.1.7
npm ERR! missing: escape-html@1.0.2, required by serve-static@1.10.0
npm ERR! missing: escape-html@1.0.2, required by send@0.13.0
npm ERR! missing: etag@~1.7.0, required by send@0.13.0
npm ERR! missing: mime@1.3.4, required by send@0.13.0
npm ERR! missing: ms@0.7.1, required by send@0.13.0
npm ERR! missing: on-finished@~2.3.0, required by send@0.13.0
npm ERR! missing: statuses@~1.2.1, required by send@0.13.0
npm ERR! missing: core-js@^1.0.0, required by fbjs-scripts@0.2.2
npm ERR! missing: dateformat@^1.0.11, required by gulp-util@3.0.7
npm ERR! missing: minimist@^1.1.0, required by gulp-util@3.0.7
npm ERR! missing: dateformat@^1.0.11, required by fancy-log@1.1.0
npm ERR! missing: sparkles@^1.0.0, required by glogg@1.0.0
npm ERR! missing: lodash._isiterateecall@^3.0.0, required by lodash.template@3.6.2
npm ERR! missing: lodash.isarguments@^3.0.0, required by lodash.keys@3.1.2
npm ERR! missing: lodash.isarray@^3.0.0, required by lodash.keys@3.1.2
npm ERR! missing: duplexer2@0.0.2, required by multipipe@0.1.2
npm ERR! missing: readable-stream@~2.0.0, required by through2@2.0.0
npm ERR! missing: xtend@~4.0.0, required by through2@2.0.0
npm ERR! missing: commoner@^0.10.1, required by jstransform@11.0.3
npm ERR! missing: JSONStream@^1.0.3, required by module-deps@3.9.1
npm ERR! missing: detective@^4.0.0, required by module-deps@3.9.1
npm ERR! missing: resolve@^1.1.3, required by module-deps@3.9.1
npm ERR! missing: xtend@^4.0.0, required by module-deps@3.9.1
npm ERR! missing: resolve@1.1.6, required by browser-resolve@1.10.1
npm ERR! missing: core-util-is@~1.0.0, required by readable-stream@1.0.33
npm ERR! missing: isarray@0.0.1, required by readable-stream@1.0.33
npm ERR! missing: string_decoder@~0.10.x, required by readable-stream@1.0.33
npm ERR! missing: minimist@^1.1.0, required by subarg@1.0.0
npm ERR! missing: xtend@>=4.0.0 <4.1.0-0, required by through2@1.1.1
npm ERR! missing: commoner@~0.10.3, required by regenerator@0.8.41
npm ERR! missing: private@~0.1.5, required by regenerator@0.8.41
npm ERR! missing: decamelize@^1.0.0, required by yargs@3.27.0
npm ERR! missing: os-locale@^1.4.0, required by yargs@3.27.0
npm ERR! missing: window-size@^0.1.2, required by yargs@3.27.0
npm ERR! missing: y18n@^3.2.0, required by yargs@3.27.0
npm ERR! missing: lazy-cache@^0.2.4, required by center-align@0.1.2
npm ERR! missing: align-text@^0.1.1, required by right-align@0.1.3
npm ERR! missing: private@~0.1.5, required by recast@0.10.33
npm ERR! missing: lru-cache@2, required by minimatch@0.2.14
npm ERR! missing: xtend@>=4.0.0 <4.1.0-0, required by worker-farm@1.3.1
npm ERR! missing: bindings@1.2.x, required by utf-8-validate@1.2.1
npm ERR! missing: nan@^2.0.5, required by utf-8-validate@1.2.1
npm ERR! missing: window-size@^0.1.2, required by yargs@3.29.0
npm ERR! missing: number-is-nan@^1.0.0, required by code-point-at@1.0.0
npm ERR! missing: number-is-nan@^1.0.0, required by is-fullwidth-code-point@1.0.0
npm ERR! missing: ansi-regex@^2.0.0, required by strip-ansi@3.0.0
npm ERR! missing: diff@^2.1.2, required by yeoman-environment@1.3.0
npm ERR! missing: grouped-queue@^0.3.0, required by yeoman-environment@1.3.0
npm ERR! missing: lodash@^3.1.0, required by yeoman-environment@1.3.0
npm ERR! missing: mem-fs@^1.1.0, required by yeoman-environment@1.3.0
npm ERR! missing: arrify@^1.0.0, required by globby@3.0.1
npm ERR! missing: glob@^5.0.3, required by globby@3.0.1
npm ERR! missing: object-assign@^4.0.1, required by globby@3.0.1
npm ERR! missing: array-uniq@^1.0.1, required by array-union@1.0.1
npm ERR! missing: ansi-regex@^2.0.0, required by inquirer@0.11.0
npm ERR! missing: lodash@^3.3.1, required by inquirer@0.11.0
npm ERR! missing: run-async@^0.1.0, required by inquirer@0.11.0
npm ERR! missing: strip-ansi@^3.0.0, required by inquirer@0.11.0
npm ERR! missing: through@^2.3.6, required by inquirer@0.11.0
npm ERR! missing: onetime@^1.0.0, required by restore-cursor@1.0.1
npm ERR! missing: code-point-at@^1.0.0, required by readline2@1.0.1
npm ERR! missing: is-fullwidth-code-point@^1.0.0, required by readline2@1.0.1
npm ERR! missing: cross-spawn@^2.0.0, required by yeoman-generator@0.20.3
npm ERR! missing: dateformat@^1.0.11, required by yeoman-generator@0.20.3
npm ERR! missing: diff@^2.0.2, required by yeoman-generator@0.20.3
npm ERR! missing: download@^4.1.2, required by yeoman-generator@0.20.3
npm ERR! missing: github-username@^2.0.0, required by yeoman-generator@0.20.3
npm ERR! missing: lodash@^3.5.0, required by yeoman-generator@0.20.3
npm ERR! missing: mem-fs-editor@^2.0.0, required by yeoman-generator@0.20.3
npm ERR! missing: path-exists@^1.0.0, required by yeoman-generator@0.20.3
npm ERR! missing: path-is-absolute@^1.0.0, required by yeoman-generator@0.20.3
npm ERR! missing: text-table@^0.2.0, required by yeoman-generator@0.20.3
npm ERR! missing: through2@^2.0.0, required by yeoman-generator@0.20.3
npm ERR! missing: inflight@^1.0.4, required by glob@4.3.5
npm ERR! missing: inherits@2, required by glob@4.3.5
npm ERR! missing: minimatch@^2.0.1, required by glob@4.3.5
npm ERR! missing: once@^1.3.0, required by glob@4.3.5
npm ERR! missing: once@^1.3.0, required by glob@5.0.15
npm ERR! missing: path-is-absolute@^1.0.0, required by glob@5.0.15
npm ERR! missing: once@^1.3.0, required by inflight@1.0.4
npm ERR! missing: wrappy@1, required by inflight@1.0.4
npm ERR! missing: brace-expansion@^1.0.0, required by minimatch@3.0.0
npm ERR! missing: lodash@^3.2.0, required by gruntfile-editor@1.1.0
npm ERR! missing: escodegen@^1.6.0, required by ast-query@1.0.1
npm ERR! missing: esprima@^2.0.0, required by ast-query@1.0.1
npm ERR! missing: lodash@^3.2.0, required by ast-query@1.0.1
npm ERR! missing: lodash@^3.2.0, required by cheerio@0.19.0
npm ERR! missing: domelementtype@1, required by domutils@1.4.3
npm ERR! missing: readable-stream@1.1, required by htmlparser2@3.8.3
npm ERR! missing: get-stdin@^4.0.1, required by detect-newline@1.0.3
npm ERR! missing: minimist@^1.1.0, required by detect-newline@1.0.3
npm ERR! missing: cli-width@^1.0.1, required by inquirer@0.8.5
npm ERR! missing: figures@^1.3.5, required by inquirer@0.8.5
npm ERR! missing: lodash@^3.3.1, required by inquirer@0.8.5
npm ERR! missing: through@^2.3.6, required by inquirer@0.8.5
npm ERR! missing: get-stdin@^4.0.1, required by pretty-bytes@2.0.1
npm ERR! missing: meow@^3.1.0, required by pretty-bytes@2.0.1
npm ERR! missing: number-is-nan@^1.0.0, required by pretty-bytes@2.0.1
npm ERR! missing: once@^1.3.0, required by run-async@0.1.0
npm ERR! missing: inherits@2.0.1, required by util@0.10.3
npm ERR! missing: os-homedir@^1.0.0, required by user-home@2.0.0
npm ERR! missing: os-homedir@^1.0.0, required by xdg-basedir@2.0.0
npm ERR! missing: lodash@^3.6.0, required by yeoman-assert@2.1.0
npm ERR! missing: path-exists@^1.0.0, required by yeoman-assert@2.1.0
npm ERR! invalid: harvest@0.2.0 /usr/local/lib/node_modules/revenue-core/node_modules/harvest
npm ERR! invalid: adler-32@0.2.1 /usr/local/lib/node_modules/sqlpad/node_modules/node-xlsx/node_modules/xlsx/node_modules/adler-32
npm ERR! invalid: commander@2.9.0 /usr/local/lib/node_modules/sqlpad/node_modules/node-xlsx/node_modules/xlsx/node_modules/commander
npm ERR! invalid: crc-32@0.3.0 /usr/local/lib/node_modules/sqlpad/node_modules/node-xlsx/node_modules/xlsx/node_modules/crc-32
npm ERR! missing: commander@, required by cfb@0.10.3
npm ERR! missing: commander@, required by codepage@1.3.8
npm ERR! invalid: concat-stream@1.5.1 /usr/local/lib/node_modules/sqlpad/node_modules/node-xlsx/node_modules/xlsx/node_modules/codepage/node_modules/concat-stream
npm ERR! invalid: voc@0.5.0 /usr/local/lib/node_modules/sqlpad/node_modules/node-xlsx/node_modules/xlsx/node_modules/codepage/node_modules/voc
npm ERR! invalid: voc@0.5.0 /usr/local/lib/node_modules/sqlpad/node_modules/node-xlsx/node_modules/xlsx/node_modules/ssf/node_modules/voc
~|⇒ npm outdated -g
Package                            Current             Wanted            Latest  Location
actionhero                          12.2.0             12.3.0            12.3.0
ava                                  0.4.2              0.7.0             0.7.0
babel                               6.1.18             6.3.13            6.3.13
babel-cli                            6.2.0             6.3.15            6.3.15
babel-core                           6.2.1             6.3.15            6.3.15
bower                                1.6.8              1.6.9             1.6.9
check-build                          2.2.1              2.6.0             2.6.0
cordova-ios                          3.9.1              3.9.2             3.9.2
db-migrate                          0.9.23             0.9.23     0.10.0-beta.6
generator-fluxible                   1.2.0              1.2.4             1.2.4
generator-keystone                   0.3.9             0.3.10            0.3.10
generator-react-webpack              2.2.7              3.1.1             3.1.1
git-stats-importer                   2.2.0              2.4.0             2.4.0
harvest                              0.2.0              0.1.3             0.1.3
ios-deploy                           1.8.2              1.8.3             1.8.3
ios-sim                              5.0.3              5.0.4             5.0.4
mocha                                2.3.3              2.3.4             2.3.4
nexe                                 0.4.1              0.4.2             0.4.2
node-gyp                             3.2.0              3.2.1             3.2.1
node-inspector                      0.12.3             0.12.4            0.12.4
npm                                  3.5.0              3.5.2             3.5.1
npm-check-updates        2.5.4-spawnglobal  2.5.4-spawnglobal             2.5.4
phonegap                             5.3.6              5.3.9             5.3.9
plugman                              1.0.4              1.0.5             1.0.5
pm2                                 0.15.8            0.15.10           0.15.10
react-native                        0.13.2             0.16.0            0.16.0
react-ui-builder                     0.3.4              0.3.4  0.3.5-deprecated
sequelize                           3.13.0             3.14.2            3.14.2
sqlpad                              1.10.0             1.12.0            1.12.0
webpack                             1.12.2             1.12.9            1.12.9
yo                                   1.4.8              1.5.0             1.5.0

@raineorshine
Copy link
Owner

Shoot. I don't know why it is reporting errors for nested dependencies when I am explicitly setting --depth 0.

@raineorshine
Copy link
Owner

@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.

@glen-84
Copy link

glen-84 commented Dec 6, 2015

$ npm install -g npm-check-updates@2.5.4-spawnglobal
C:\Users\Glen\AppData\Roaming\npm\npm-check-updates -> C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\bin\old-alias
C:\Users\Glen\AppData\Roaming\npm\ncu -> C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\bin\npm-check-updates
- readable-stream@2.0.4 node_modules\npm-check-updates\node_modules\duplexify\node_modules\readable-stream
- readable-stream@2.0.4 node_modules\npm-check-updates\node_modules\read-all-stream\node_modules\readable-stream
C:\Users\Glen\AppData\Roaming\npm
└─┬ npm-check-updates@2.5.4-spawnglobal
  ├─┬ npm@3.5.1
  │ └─┬ npm-registry-client@7.0.9
  │   └─┬ concat-stream@1.5.1
  │     └── readable-stream@2.0.4
  ├─┬ npmi@1.0.1
  │ └─┬ npm@2.14.14
  │   ├── fs-write-stream-atomic@1.0.5
  │   ├── imurmurhash@0.1.4
  │   ├─┬ node-gyp@3.2.1
  │   │ └─┬ glob@4.5.3
  │   │   └─┬ minimatch@2.0.10
  │   │     └─┬ brace-expansion@1.1.2
  │   │       └── balanced-match@0.3.0
  │   ├─┬ npm-registry-client@7.0.8
  │   │ ├─┬ concat-stream@1.5.1
  │   │ │ └── readable-stream@2.0.4
  │   │ └─┬ npmlog@2.0.0
  │   │   └─┬ are-we-there-yet@1.0.5
  │   │     └─┬ readable-stream@2.0.4
  │   │       └── process-nextick-args@1.0.6
  │   └── write-file-atomic@1.1.4
  ├── spawn-please@0.1.0
  └─┬ update-notifier@0.5.0
    └─┬ configstore@1.3.0
      └─┬ write-file-atomic@1.1.4
        └── imurmurhash@0.1.4


$ ncu -g


┌─────────────────────────────────────────────────┐
│ Update available: 2.5.4 (current: 2.5.2)        │
│ Run npm install -g npm-check-updates to update. │
└─────────────────────────────────────────────────┘

Unhandled rejection Error: spawn npm ENOENT
    at exports._errnoException (util.js:856:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:452:9)
    at process._tickCallback (node.js:366:17)
From previous event:
    at doNTCallback0 (node.js:430:9)
    at process._tickCallback (node.js:359:13)
From previous event:
    at Object.module.exports._.merge.run (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:400:12)
    at Object.<anonymous> (C:\Users\Glen\AppData\Roaming\npm\node_modules\npm-check-updates\bin\npm-check-updates:38:5)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Function.Module.runMain (module.js:457:10)
    at startup (node.js:138:18)
    at node.js:974:3


$ ncu --version
2.5.4-spawnglobal

@glen-84
Copy link

glen-84 commented Dec 6, 2015

Does this have anything to do with the fact that there is an npmrc file in C:\Program Files\nodejs\node_modules\npm that points to prefix=${APPDATA}\npm (the actual location of my global packages)?

@raineorshine
Copy link
Owner

I'm kind of stumped :/

@G3z
Copy link

G3z commented Dec 7, 2015

yes @metaraine harvest is a linked module

@sidneys
Copy link

sidneys commented Dec 9, 2015

I have the same problem, on OSX. Node is installed via the "n" module:

$:  ncu -g --loglevel silly
Initializing...
Running in global mode...
Getting installed packages...
{}

Fetching latest versions...
{}

All global packages are up-to-date :)

Adding PREFIX="/usr/local/" does not change the result.

@ntwb
Copy link

ntwb commented Feb 18, 2016

I just added an alias to my bash profile alias ncug='PREFIX="/usr/local/" ncu -g', maybe I'll remember ncug from now on ;)

@kurtextrem
Copy link
Contributor

I have the same problem: http://prntscr.com/amslcf

@nielsgl
Copy link
Contributor

nielsgl commented Apr 24, 2016

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:
npm config get prefix -g
that will return /usr/local, and the global node_modules folder can be found with npm root -g.

You can verify the differences in the paths during the init function in lib/package-manages/npm.js, by adding on line 60 before the return statement:

console.log(npm.config.get('prefix'));
console.log(npm.commands.root('-g'));

then if you run the npm-check-updates command from the repository with ./bin/npm-check-updates -g
and see that it returns the wrong paths (5.11.0 is my node version)

/usr/local/Cellar/node/5.11.0
/usr/local/Cellar/node/5.11.0/lib/node_modules

@metaraine I will send a PR with a fix for homebrew, will also look into @sidneys 's problem using the n module.

nielsgl added a commit to nielsgl/npm-check-updates that referenced this issue Apr 24, 2016
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`.
@raineorshine
Copy link
Owner

@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 npm config get prefix -g I get /Users/raine/.nvm/versions/node/v5.5.0. Would setting npm.config.set('prefix', '/usr/local') be incorrect in this situation?

@nielsgl
Copy link
Contributor

nielsgl commented Apr 25, 2016

@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 :)

@raineorshine
Copy link
Owner

Terrific! Thanks!

On Mon, Apr 25, 2016 at 9:42 AM Niels van Galen Last <
notifications@github.com> wrote:

@metaraine https://github.com/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 :)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#146 (comment)

@nielsgl
Copy link
Contributor

nielsgl commented Apr 26, 2016

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
Copy link
Owner

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

@nielsgl
Copy link
Contributor

nielsgl commented Apr 29, 2016

@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
Copy link
Owner

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
#146 (comment)

raineorshine added a commit that referenced this issue May 3, 2016
Fixes: ncu -g doesn't work on homebrew (#146)
@cebor
Copy link
Author

cebor commented May 3, 2016

the fix works, thx

@cebor cebor closed this as completed May 3, 2016
@raineorshine
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests