This happens when I am using a virtual VMwarePlayer Ubuntu OS, and install express in a “Shared Folder” pointing to a location on my hard drive external to Ubuntu.
When using a location on a folder within the standard Ubuntu location, I do not get this error.
I made it work by installing all dependencies globally one by one with sudo npm install -g <package>, then setting $NODE_PATH (which was empty before) to the location of the global npm repository,in my case /usr/local/lib/node_modules
For eg:
sudo npm install -g express
export NODE_PATH=/usr/local/lib/node_modules
This will surely work.

Be the first to comment.