Npm Cannot find module 'process-nextick-args'

Hello dear community,

I am working on the following challenge.

When i update npm on cloud9, npm gets broken. It starts to give the following error. I cant install any other packages or do anything else. Probobly looks like a bug but anyone had such an experince?

Error: Cannot find module 'process-nextick-args’
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. (/home/ubuntu/.nvm/versions/node/v6.11.2/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:26:23)
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)

Thanks for your help,
Jay

3 Likes

yup, happening to me as we speak!

very disheartening. im trying to follow the p1xt guide and it all revolves around getting the back-end down first ;(

i posted a question on Stack Overflow yesterday and was horribly dismissed and immediately downvoted, simply because the issue had many “solutions” already posted. which i did already try and nothing worked.

then for some odd reason i created a new workspace on c9 and it stopped goofing around and i managed to get a few challenges done within how-to-npm.

now im up to the Update section. and no matter what i type into the terminal it throws me that EXACT same error every single time whether i ask to show me the npm version, if i do npm update -g, if i do npm anything lol

hope someone fixes this asap

This solution worked for me. Update your npm version to the latest recommended version as follows:

nvm install v6.11.3

after that you can do:

npm install -g how-to-npm
or
npm install -g learnyounode
29 Likes

Thank you so much. This solved my problem. Been pulling out my hair.

1 Like

great job darush!

after the command below, updated npm again and this time it worked like a charm :slight_smile:
nvm install v6.11.3

this was a really bad bug. specially when you have such a boring bug at the beginning, its hair pulling as @divinelove says…

thanks!

1 Like

thanks alot worked for me too.

Thanks darush. Worked perfectly.

This worked for me too, but I had to start fresh with a new work space in order for it to work. Thanks, bro!

THANKS THANKS THANKS~!

Can’t believe how many “solutions” did not work before this one.

youda youda best

1 Like

Thanks this was incredible helpful. I blame myself for using the forums as my last choice to find an answer. It should have been my first. Live and learn.

Thanks for the solution! It worked for me. I ran the following:

nvm install v6.11.3

Then,

npm install -g how-to-npm

When running the verify command, I get the following:

verifying that npm is installed...
You have version 3.10.10 installed.  Great!
Now let's see what the latest version is... wait for it...
The latest npm is: 5.4.2
You have version 3.10.10, but the latest is 5.4.2
Run `npm install npm -g` to upgrade it
(You can also just skip this if you want)

For the challenges, is it necessary to upgrade to 5.4.2?

Awesome, this got rid of that error when I run how-to-npm verify…

Thanks a lot :smiley:

This worked for me. Thank you.

@darush Thanks a lot!!!

1 Like

$ how-to-npm verify
verifying that npm is installed…
module.js:471
throw err;
^

Error: Cannot find module ‘process-nextick-args’
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. (/home/ubuntu/.nvm/versions/node/v6.11.2/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:26:23)
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)
Uh oh! npm had a problem! { Error: Command failed: “/home/ubuntu/.nvm/versions/node/v6.11.2/bin/npm” --version

Having problem upgrading npm with “npm install npm -g”. Help!!! :exploding_head:

THANKS!! This solved my problem!!!

You can update your top post with correct solution btw.

Thanks! works like a charm.

1 Like

@darush You da real mvp

1 Like