Node: Cannot find module 'npmlog' after upgrading to NodeJS 4.0

Created on 11 Sep 2015  路  14Comments  路  Source: nodejs/node

After upgrading to NodeJS 4.0 on Windows 10 x64, npm is completely unusable giving me the following:

module.js:338
throw err;
^

Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at C:\Users\Cedon\AppData\Roaming\npm\node_modules\npmbin\npm-cli.js:18:11
at Object. (C:\Users\Cedon\AppData\Roaming\npm\node_modules\npmbin\npm-cli.js:75:3)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)

I have done just about everything I can think of short of downgrading back to 0.12.7. Reinstalls result in the same problem.

npm question windows

Most helpful comment

C:\Users\Cedon\AppData\Roaming\npm is the path for global installed modules, so if I have to guess, your global installed npm is not up to date. Try to remove the global installed npm and use the build in version, that comes with the node installer. To remove the global installed npm delete the npm and npm.cmd files in C:\Users\Cedon\AppData\Roaming\npm and the folder npm in C:\Users\Cedon\AppData\Roaming\npm\node_modules.

All 14 comments

C:\Users\Cedon\AppData\Roaming\npm is the path for global installed modules, so if I have to guess, your global installed npm is not up to date. Try to remove the global installed npm and use the build in version, that comes with the node installer. To remove the global installed npm delete the npm and npm.cmd files in C:\Users\Cedon\AppData\Roaming\npm and the folder npm in C:\Users\Cedon\AppData\Roaming\npm\node_modules.

That did it. I thought I swept everything out but looks like that got missed. Thanks.

thanks @mathiask88 ! deleting those files fixes node-gyp build issue for me.

thanks @mathiask88 this solved my issue too!

thanks a lot @mathiask88. The issue got fixed with your answer.

thanks @mathiask88 solves my issue too... :)

thanks @mathiask88 that worked.

thanks @mathiask88 it's ok

worked for me..
Thanks @mathiask88

Hello, I am new to node.js but I keep getting this problem on my command prompt. I am also new to the command prompt...thanks!

Microsoft Windows Version 10.0.10586 2015 Microsoft Corporation. All rights reserved.

C:\Users\Efren Barragan>AppData\Roamingnpm
'AppData\Roamingnpm' is not recognized as an internal or external command,
operable program or batch file.

Thanks @mathiask88. Worked for me!

@mathiask88 Thanks! It helps a lot!

@mathiask88 Thanks you! It worked for me.

@mathiask88 - Thanks, it worked!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akdor1154 picture akdor1154  路  3Comments

vsemozhetbyt picture vsemozhetbyt  路  3Comments

loretoparisi picture loretoparisi  路  3Comments

stevenvachon picture stevenvachon  路  3Comments

filipesilvaa picture filipesilvaa  路  3Comments