npm bin的默认位置更改

时间:2022-09-21 22:41:06

I want to change the npm bin and npm bin -g locations. How can I do that from the command line? When npm is installed, the package prefers a location other than /usr/bin.

我想更改npm bin和npm bin -g位置。我怎么能从命令行执行此操作?安装npm时,程序包首选的位置不是/ usr / bin。

1 个解决方案

#1


try this.

$-g/npmrc or -c/npmrc

$ -g / npmrc或-c / npmrc

-g =global

-C =prefix

refer this link https://docs.npmjs.com/misc/config#command-line-flags

请参阅此链接https://docs.npmjs.com/misc/config#command-line-flags

#1


try this.

$-g/npmrc or -c/npmrc

$ -g / npmrc或-c / npmrc

-g =global

-C =prefix

refer this link https://docs.npmjs.com/misc/config#command-line-flags

请参阅此链接https://docs.npmjs.com/misc/config#command-line-flags