[x] I have searched for similiar issues before filing this issue.
node version: 7.7.2
Sometimes I receive this (using ncu or ncu -g):
C:\Projects\node_modules\npm\node_modules\npmlog\log.js:57
log.progressEnabled = log.gauge.isEnabled()
^
TypeError: log.gauge.isEnabled is not a function
at Object.<anonymous> (C:\Projects\node_modules\npm\node_modules\npmlog\log.js:57:33)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Projects\node_modules\npm\lib\utils\umask.js:2:14)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
Thanks for reporting! Do you ever get that error when running npm itself? It looks to be coming from npm.
If you could identify more specifically when this occurs that would be helpful as well! Thanks.
I had this issue when I installed using: yarn global add npm-check-updates
The issue happened when I attempted to run ncu inside of a project directory.
I fixed the issue by uninstalling using: yarn global remove npm-check-updates and then reinstalling using yarn global add npm-check-updates --prefix /usr/local.
I'm not sure why that might have made a difference, but I'm up and running now.
@claydiffrient
That doesn't look to be an issue with ncu but with yarn not using npm's prefix config when installing bins from global cli tools (which is defaulted to /usr/local).
On the yarn issue tracker it looks like people use the --prefix option or just install global cli tools with npm.
@eighty4 I agree it's not a ncu issue. I mostly just posted to make sure that anyone else that landed here knew a workaround :)
I'm not installing ncu with yarn as global tool (only with npm i -g) and still I'm having the problem...
@johnunclesam Thanks, I'd like to figure out the issue for you. I might need some more information first since I am not able to reproduce it. Do you experience this same problems with other global installs, or is it just ncu?
I think it is an issue of yarn, please check yarn#3202.
Closing as it does not appear to be an ncu issue. Feel free to re-open if there is something that we should do. Thanks!
I'm pretty sure this is not actually Yarn's fault. It's because of the Npm dependency mentioned in #369, which causes an installation of a second local (and probably older) copy of Npm, which then conflicts with the main global one.
hit this today after doing a yarn add some other packages
fixed with rm-rf node_modules THEN yarn install
I fixed the issue by commenting out line 57 in /usr/local/lib/node_modules/npm/node_modules/npmlog/log.js
log.progressEnabled = log.gauge.isEnabled()
Just try to run yarn global add { any npm package }, works for me!
Most helpful comment
I fixed the issue by commenting out line 57 in /usr/local/lib/node_modules/npm/node_modules/npmlog/log.js
log.progressEnabled = log.gauge.isEnabled()