Install NPM into home directory with distribution nodejs package (Ubuntu)

后端 未结 8 1645
忘了有多久
忘了有多久 2020-12-07 06:38

I\'d like to use the distribution Node.js packages (or the chris-lea ppa for more recent releases) but install NPM to my home directory.

This may seem picky, but it

8条回答
  •  春和景丽
    2020-12-07 07:41

    As stated already here and here

    npm config set prefix ~
    echo export PATH=\$PATH:\~/bin >> ~/.bashrc
    . ~/.bashrc
    

提交回复
热议问题