1. 在命令行中创建一个文件.npm-global,把这个文件作为全局安装的文件夹
    mkdir ~/.npm-global
  2. 设置路劲
    npm config set prefix '~/.npm-global'
  3. 在~目录下打开或者创建一个 .profile。并且添加一行代码
    export PATH=~/.npm-global/bin:$PATH
  4. 应用.profile,在命令行中输入
    source ~/.profile
  5. 接下来就可以直接使用全局安装命令了
    npm install -g awsmobile-cli
    awsmobile configure

相关文章:

  • 2021-09-29
  • 2021-09-29
  • 2021-09-29
  • 2021-11-24
  • 2021-11-19
  • 2021-10-22
猜你喜欢
  • 2021-07-01
  • 2021-04-13
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
相关资源
相似解决方案