Node.js is used in Git bash (windows). why does it always look for modules in git installation directory? Is there any setting method?

  node.js, question

clipboard.png

Can it be set to be installed in the git directory by default and read modules from git? Or how do you do it?

Previous attempts have been made to copy the modules under the nodejs installation directory to the git installation directory, but the magic Windows will always prompt that the path is too long and the file name is too long, resulting in incomplete copy.
Nodejs in cmd inside and many commands can not be used.

Novice, please point out any inappropriate questions. Thank you

Add node_path to the environment variable and then add the path of node_global to the path. You can refer to this answer of stackoverflow: http://stackoverflow.com/questions/9587665/nodejs-cannot-find-installed-module-on-windows.