Segmentation fault (core dumped) error for every npm command

(Jake IQ) #1

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?

(Nikita Mankovskii) #2

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

(Jake IQ) #3

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.

1 Like
(system) closed #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.