4

npm使用非root用户进行管理安装

 3 years ago
source link: https://www.80shihua.com/archives/2763
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
npm使用非root用户进行管理安装 | 梦回故里

npm使用非root用户进行管理安装

  • 下载npm二进制执行文件放入到当前用户目录下
  • 将目录添加到环境变量中,就是添加到.bash_profile中
  • 重新加载环境变量, source ~/.bash_profile
  • 添加前缀配置到npm配置文件
echo 'prefix = ${HOME}/.npm_packages' > ~/.npmrc 

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK