6

Whenever I run npm on the command line, whether it's npm install or npm run build or just npm by itself I get segmentation faults. I am running windows 8.1 I tried uninstalling and reinstalling node.js with different x64 msi from the node website. All successfully install node.js but whenever I return to the command prompt, terminal, or git bash to run npm. The same recurring issue of segmentation fault keeps appearing.

Is there anyone who has experience segmentation fault on windows? What methods or approach did you take to resolve it?
cmd
I tried installing current version, then older versions and nothing sees to work. Is there an installation process I might be skipping unknowingly? Or is there still binaries in registry that need to be purged before a different installation? Or other hidden directories to delete?

Please help. Thanks

naveen
  • 53,448
  • 46
  • 161
  • 251
US javabc
  • 61
  • 1
  • 1
  • 5

2 Answers2

3

Use this command to check if you have segmentation faults.

npm cache verify

If you do, clean the npm cache this way.

npm cache clean --force

Then try rebuilding your project.

If it doesn't work try to uninstall node completely then put it back. You may need to re-run the steps above after reinstalling node and npm.

Olivier Tonglet
  • 3,312
  • 24
  • 40
-1

I had the same issue now.

I checked the node version and npm

node -v

v8.11.3

npm -v

5.6.0

I updated the npm to the latest.

npm install -g npm@latest

npm -v

6.4.1

Now npm install, npm run build is working fine now. :)

Raphael
  • 1,738
  • 2
  • 27
  • 47