When I run npm install -g npm-check-updates I get the following error..
npm ERR! path /usr/local/lib/node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is' -> '/usr/local/lib/node_modules/npm-check-updates/node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/.core-util-is.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ns/.npm/_logs/2018-01-05T02_31_59_837Z-debug.log```
I've tested installing other npm packages globally and didn't run into a similar issue. Worth noting `yarn global add npm-check-updates` works just fine
__UPDATE__: Still an open issue, but if you're looking for a quick workaround use yarn global add npm-check-updates instead of npm
Same here
Can you see if this issue is happening on any other projects? It doesn't seem to be specific to npm-check-updates.
npm-check-updates -> request -> readable-stream -> core-utils-is
This fixed it for me:
$ npm uninstall -g npm-check-updates
$ npm install -g npm-check-updates
Ha, @kostaspt this worked for me also. Weird issue. Tried even force installing before and that didn't work. Thx.
Is it worth keeping this issue open? It seems it's outside of the scope of npm-check-updates codebase, especially when as you say, switching to yarn solves this? Personally, I used to have issues with stale/clashing/unresolved npm libs, but I then started to aggressively and often wipe the node_modules and package.lock on every update/reinstall and I don't get such kinds of errors any more.
On cases like this, first thing is to try to manually delete the /usr/local/lib/node_modules/npm-check-updates/. I wouldn't even trust npm r -g ....
So, should we close this issue?
@revelt Yes, unfortunately many issues seem to be fixed by uninstalling and reinstalling ncu. Either the issues is with npm itself, or the dependency npm which will be removed in the next major version update.
Most helpful comment
This fixed it for me: