npm doesn't work, get always this error -> Error: Cannot find module 'are-we-there-yet' npm doesn't work, get always this error -> Error: Cannot find module 'are-we-there-yet' node.js node.js

npm doesn't work, get always this error -> Error: Cannot find module 'are-we-there-yet'


You have broken npm by removing some of its dependencies.

are-we-there-yet is a dependency of npmlog which is a dependency of npm itself, and you somehow deleted it. The usual simple solution for such cases is reinstalling a package, but that doesn't work if npm cannot operate. Fortunately, npm tarball comes prebundled with dependencies and hence installing npm from scratch is as simple as unpacking a tarball.

1) Go to the global node_modules directory (what would npm root -g print if you could run it):

$ cd /usr/local/lib/node_modules

2) Remove the broken npm directory or move it somewhere else (note that you might need to elevate permissions for this and the following steps):

$ mv npm /tmp

3) Download and unpack fresh npm from the registry (substitute version you want to install, e.g. 3.10.8):

$ curl -L registry.npmjs.com/npm/-/npm-{VERSION}.tgz | tar xz --transform="s:^package:npm:"

You can automate some of that with this install script:

$ curl -L https://www.npmjs.com/install.sh | sh

At this point npm should work again.


Go to the global node_modules directory (npm root -g if you don't know)

$ cd /usr/local/lib/node_modulescurl -L https://www.npmjs.com/install.sh | sh


Even i had same issue, Easiest way to solve below steps worked for me.

  1. uninstall Nodejs.

  2. Go to C:/Users/<user_name>/AppData/Roaming.

  3. Delete npm directory.

  4. Reinstall Nodejs (latest v6.11.3,includes npm 3.10.10).

  5. Done Now try to check (npm -v) will be working fine.