Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve "Segmentation fault: 11" error when running nodejs?

Tags:

node.js

I am using Mac OS Yosemite. I use npm install -g n to install the n module to try to upgrade nodejs. Then I run

n stable

But I received an error during the upgrade and it quit unexpectedly.

Then when I type "node -v" I get an error:

Segmentation fault: 11

In fact I get this error when I type npm install and node so literally I can't use node or npm anymore.

What does it mean? how can I get my node.js back? I tried to reinstall it using brew install node but after the install I still get the error.

like image 607
newguy Avatar asked Dec 14 '25 02:12

newguy


1 Answers

Remove your node modules folder and try to reinstall. Depending on what version of node you were previously running your modules could need to rebuild for compatibility

like image 191
jcalton88 Avatar answered Dec 15 '25 16:12

jcalton88