node icon indicating copy to clipboard operation
node copied to clipboard

Cannot find module 'npmlog' after upgrading to NodeJS 4.0

Open cedon opened this issue 11 years ago • 14 comments

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\npm\bin\npm-cli.js:18:11 at Object. (C:\Users\Cedon\AppData\Roaming\npm\node_modules\npm\bin\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.

cedon avatar Sep 11 '15 12:09 cedon

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.

mathiask88 avatar Sep 11 '15 14:09 mathiask88

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

cedon avatar Sep 11 '15 15:09 cedon

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

thstarshine avatar Dec 12 '15 13:12 thstarshine

thanks @mathiask88 this solved my issue too!

rcheuk avatar Dec 17 '15 20:12 rcheuk

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

abhineet-mishra avatar Jan 07 '16 09:01 abhineet-mishra

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

myselfsufiyan avatar Feb 16 '16 22:02 myselfsufiyan

thanks @mathiask88 that worked.

harvest316 avatar Feb 26 '16 00:02 harvest316

thanks @mathiask88 it's ok

abcdGJJ avatar Apr 29 '16 01:04 abcdGJJ

worked for me.. Thanks @mathiask88

ritox842 avatar May 25 '16 12:05 ritox842

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\Roaming\npm 'AppData\Roaming\npm' is not recognized as an internal or external command, operable program or batch file.

Efren-Barragan avatar May 27 '16 18:05 Efren-Barragan

Thanks @mathiask88. Worked for me!

nicolasgaviola avatar Jun 20 '16 14:06 nicolasgaviola

@mathiask88 Thanks! It helps a lot!

makazeu avatar Sep 22 '16 11:09 makazeu

@mathiask88 Thanks you! It worked for me.

htran81 avatar Oct 14 '16 04:10 htran81

@mathiask88 - Thanks, it worked!

gameboyzone avatar Nov 17 '16 17:11 gameboyzone