npm install not working in windows

After countless hours of debugging and researching, I decided to install in a different machine to see if the problem was with my Node installation. It worked.

So for everyone who may come across this, know that the possibility to uninstall node and delete NPM will be there. This is what I did. I believe it is the safest way to solve the problem and all the rest of your applications installed in your machine will still work. I credit this answer for these steps, although I had other npm and node_modules in other locations. So do a quick search for these and unless they are part of an application, make sure they are deleted as well.

  1. Uninstall from Programs & Features with the uninstaller.

  2. Reboot (or you probably can get away with killing all node-related processes from Task Manager).

  3. Look for these folders and remove them (and their contents) if any still exist. Depending on the version you installed, UAC settings, and CPU architecture, these may or may not exist:

    • C:\Program Files (x86)\Nodejs
    • C:\Program Files\Nodejs
    • C:\Users\{User}\AppData\Roaming\npm (or %appdata%\npm)
    • C:\Users\{User}\AppData\Roaming\npm-cache (or %appdata%\npm-cache)
    • C:\Users\{User}\.npmrc (and possibly check for that without the . prefix too)
  4. Check your %PATH% environment variable to ensure no references to Nodejs or npm exist.

  5. If it's still not uninstalled, type where node at the command prompt and you'll see where it resides -- delete that (and probably the parent directory) too.

  6. Reboot, for good measure.


Please read the error carefully. It's saying :

[email protected]: wanted {"os":"darwin","arch":"any"}

The FSEvents API in OS X allows applications to register for notifications of changes to a given directory tree.

It needs OS X, Because some of npm dependencies are using fsevents that's by It's breaking in windows.

https://github.com/strongloop/fsevents

Update:

As you told It's working without fsevents then you can follow these steps:

install npm-check-updates and try again.

 npm install -g npm-check-updates
 ncu -u       #It will update the npm dependencies.
 rm -fr node_modules
 npm install

It will update the dependencies and install the dependencies.
Hope It will work :)

Tags:

Node.Js

Npm