0

I would like to know if it's possible change node's default folder to install modules. By default, node install modules into node_modules folder locally, but, for convenience, I would like to install modules in a folder with a different name for the same project.

For example, I have:

  • project
    • sass
    • js
    • images
    • node_modules

And I would like to hace something like

  • project
    • sass
    • js
    • images
    • _node_modules

I don't know if it's possible, and I don't wanna mess something.

Andrés Orozco
  • 2,490
  • 5
  • 32
  • 48
  • Note that npm installs modules, not node. So, if you were to change this, you would need to change both the path node looks for local modules, and the path that npm installs local modules. – Kevin B Jun 29 '15 at 22:09
  • @KevinB that's what I want to know if it's possible to do, if not, not a problem, but if I can, it would be perfect, obviously, I don't wanna do it if there's the posibility to create a problem. – Andrés Orozco Jun 29 '15 at 22:12
  • It is definitely possible, see the linked question. however, i wouldn't suggest it unless you have a REALLY good reason to do so. – Kevin B Jun 29 '15 at 22:12
  • Thank you @KevinB I won't do it then, it was just for simple convenience, but not a real good reason. – Andrés Orozco Jun 29 '15 at 22:27

0 Answers0