Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Upgrade to NPM5 got error "Cannot find module 'delegates'" #16847

Closed
1 of 4 tasks
nmtuan200793 opened this issue Jun 1, 2017 · 4 comments
Closed
1 of 4 tasks

Upgrade to NPM5 got error "Cannot find module 'delegates'" #16847

nmtuan200793 opened this issue Jun 1, 2017 · 4 comments
Labels

Comments

@nmtuan200793
Copy link

nmtuan200793 commented Jun 1, 2017

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?
After I installed latest npm package by npm install npm@latest -g

I got the following error when run any npm command:
module.js:471
throw err;
^
Error: Cannot find module 'delegates'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\nmtuan\AppData\Roaming\npm\node_modules\npm
node_modules\npmlog\node_modules\are-we-there-yet\tracker-stream.js:4:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

So, could you please help me to resolve it?
Note that I upgrade from 3.00 -> latest version of NPM

@zkat
Copy link
Contributor

zkat commented Jun 1, 2017

You'll have to reinstall npm. I'm not sure why this would've happened and it's hard to figure out why, at this point. If you find that it's reproducible, please give us the details so we can look closer!

@zkat zkat added the npm5 label Jun 1, 2017
@nmtuan200793
Copy link
Author

@zkat, how can I reinstall NPM?
I followed https://docs.npmjs.com/misc/removing-npm, but it still throws above error:
C:\Users\nmtuan>npm uninstall npm -g
module.js:471
throw err;
^
Error: Cannot find module 'delegates'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\nmtuan\AppData\Roaming\npm\node_modules\npm
node_modules\npmlog\node_modules\are-we-there-yet\tracker-stream.js:4:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

@kumavis
Copy link

kumavis commented Jun 1, 2017

I just encountered this one when doing a clone and npm install of https://github.com/metamask/provider-engine

npm 5.0.1
node 7.6.0

logs https://gist.github.com/kumavis/a2baf3c32fa0431702facbe6e12a60b6

@ghost
Copy link

ghost commented Aug 13, 2017

Same issue here, installing source-map-support in a project with a lot of dependencies right after I installed sqlite3.

npm 5.3.0
node 8.3.0

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

No branches or pull requests

3 participants