Can not find async after installation
It is because you are installing async globally.
npm install async
will put create a directory called node_modules
, and the require
lookup algorithm will find it there.
async installed globally. For that we have to create and install modules of async.
npm install async --save
This command line add files in node_modules folder.
This worked for me:
npm uninstall async npm install -g async npm link async
A global installation of an NPM doesn't always mean that the module can be shared for multiple projects. This is a pretty popular misconception. You can read this blog post on nodejs.org for more information, but generally speaking, global modules are used for command line tools and other system utilities, not for modules to be used in your code.
So, ideally, you would need the modules locally for each of your projects.