T
T
tendkuh2019-06-01 01:36:18
Node.js
tendkuh, 2019-06-01 01:36:18

How to move individual (Not Global) node modules from the project folder to another folder?

The node_modules folder contains a lot of files, which is not very convenient.
How can I move it to another location on my hard drive?
node_modules two folders are created, one in % AppData%, the second in the root of the project, I need both of them to be created in % AppData%, only the second one is not in % AppData% \ npm but in % AppData% \ npm \ ProjectName

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Z
ZakkMalin, 2019-06-12
@tendkuh

In the new npm version this will be fixed, the node_modules folder will not be created in the project folder

I
Ivan Shumov, 2019-06-01
@inoise

You don't need to move this folder. Deploy everything from scratch with npm without the pain

K
Kirill Kudryavtsev, 2019-06-02
@Deissh

Add the node_modules folder to .gitigrore and forget to synchronize it
It is created automatically by npm and not gulp in the root of the node project, when deploying just write npm i or yarn

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question