npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Segmentation fault (core dumped) error for every npm command

NPM is completely broken for me. Every command I run returns the error “Segmentation fault (core dumped)”. Even ‘npm --version’ gets the error. I uninstalled NPM and NodeJS then reinstalled them and the issue still occurs. I’m using Ubuntu v19.04 and Node.js v10.15.3. How do I fix this?


i faced same issue
that helped me:
sudo apt --auto-remove purge npm
sudo apt --auto-remove purge nodejs
this commands should fully remove nodejs and npm with dependencies.
thats weird, but right after this commands npm was working without installation


Yeah the same thing actually happened for me too. I uninstalled node and npm but before I installed them back again, I ran node --version and npm --version and both gave me an output. I don’t get it either haha. Seems like it was double-installed or something.