3

I want to configure my node setup such that it stores global modules (installed using npm install -g <pkg> to (and also reads from) a custom directory D:\node_modules. default path is C:\Users\User\AppData\Roaming\npm . Any pointers would be much appreciated.

OS is Windows.

1 Answer 1

7

Found answer in npm help. Had to set prefix config:

D:> npm config set prefix "D:\node_modules"

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.