首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >正在尝试安装nvm

正在尝试安装nvm
EN

Stack Overflow用户
提问于 2020-07-01 23:21:34
回答 1查看 467关注 0票数 4

我正在尝试安装nvm,但总是收到错误。

我运行安装脚本

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

我得到了

代码语言:javascript
复制
=> nvm is already installed in /Users/xxxxx/.nvm, trying to update using git
=> => Compressing and cleaning up git repository

=> nvm source string already in /Users/xxxxx/.bash_profile
=> bash_completion source string already in /Users/xxxxx/.bash_profile
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:

/Users/xxxxx/.nvm/versions/node/v10.17.0/lib
└── yarn@1.22.4
=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:

     $ nvm use system
     $ npm uninstall -g a_module

=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

如果我关闭并打开一个新终端窗口并检查使用nvm -v的nvm

我得到了

zsh: command not found: nvm

EN

回答 1

Stack Overflow用户

发布于 2021-03-15 18:40:07

Mac OS修复

代码语言:javascript
复制
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh

关闭此终端后,再次打开它。

瞧,它应该像魅力一样起作用

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62680089

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档