Tuesday, 30 May 2017

How to load external node js modules

I have downloaded the node.js zip and extracted it in a folder in my Windows PC. I have set the Path to the extracted folder and can execute the node and npm command from command line. I installed external modules using npm command and a folder node_modules got created inside my extracted folder containing all my external modules. Now I created a nodejs file Test.js which loads these external modules. The Test.js can only be executed successfully if it is executed from the extracted folder. Otherwise external modules are not getting loaded. Can you suggest how I can execute the Test.js from any location on my PC?

regards Souvik Saha Bhowmik



via Souvik Saha Bhowmik

No comments:

Post a Comment