peterchan75
Supremacy Member
- Joined
- Apr 26, 2003
- Messages
- 6,719
- Reaction score
- 529
Hi,
I have been experimenting node js recently. I notice that npm with install the modules in the current directory in the node_modules folder. If the nodejs script that uses these modules and it's moved to another location, then the script will not work. Unless, the path is in require(). This is a messy approach. It would be best if all the modules are in one location. How to get npm install to put modules at a specific location and a fast way to indication the module location in require().
Thanks in advance.
I have been experimenting node js recently. I notice that npm with install the modules in the current directory in the node_modules folder. If the nodejs script that uses these modules and it's moved to another location, then the script will not work. Unless, the path is in require(). This is a messy approach. It would be best if all the modules are in one location. How to get npm install to put modules at a specific location and a fast way to indication the module location in require().
Thanks in advance.