Mike Fielden
Mike Fielden

Reputation: 10153

Segmentation Fault: 11 doing anything with node

This question appears to have been asked a lot but most appear to be directly related to C development.

I am/have been doing a lot of Node dev lately and I have run into this error Segmentation Fault: 11. After reading most if not all the questions here on StackOverflow and their respective answers, this leads me back to the beginning...

Here is what I know:

I use nvm and I have hoped to different versions of the node runtime but it seems to happen across all of them.

I have completely nuked node and nvm in hopes that would fix it but alas it did not.

Are there any other tricks or tips?

Upvotes: 2

Views: 1556

Answers (1)

Trott
Trott

Reputation: 70105

This has been seen a lot recently as people update to Node 4.x. Compiled add-ons need to be rebuilt.

The fast and easy thing to try is running npm rebuild on your project.

If that doesn't work, try removing the node_modules directory and then running npm install.

And if that doesn't work, either your project or a dependency has code interacting with native stuff that needs to be updated. The easiest thing to do in that case might be to go back to the previous version of Node. (But the best thing to do would be to update your project and/or submit pull requests for its dependencies to fix them. You can find out some more details at the NAN repo.)

Upvotes: 2

Related Questions