node.js - NVM 安装错误 : Profile not found. 已尝试 ~/.bashrc、~/.bash_profile、~/.zshrc 和 ~/.profile。

标签 node.js nvm

我只是删除并重新格式化了我的整个 Macbook Retina 驱动器以从头开始,
安装自制软件,
安装 xcode 并接受条款和条件,
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash 安装 nvm并得到以下错误:

=> nvm is already installed in /Users/dillon/.nvm, trying to update using git
=> => Compressing and cleaning up git repository

=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
=> Create one of them and run this script again
   OR
=> Append the following lines to the correct file yourself:

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

=> 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
echo $PATH返回 /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin如果这有任何帮助。

我尝试打开 issue on github但尚未收到回复

知道我可以做些什么来让 nvm 和 Node 正常运行吗?

最佳答案

没有从 nvm 安装说明中阅读此内容。它解决了我的问题。

Note: On OS X, if you get nvm: command not found after running the install script, one of the following might be the reason:-

your system may not have a [.bash_profile file] where the command is set up. Simply create one with touch ~/.bash_profile and run the

install script again you might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry.

关于node.js - NVM 安装错误 : Profile not found. 已尝试 ~/.bashrc、~/.bash_profile、~/.zshrc 和 ~/.profile。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50885208/

相关文章:

Android:流式传输相机数据并将其写入服务器

javascript - 在返回之前如何格式化 json 数组中的所有电话号码

node.js - 方法应该在 Mongoose 中的模型上定义还是在单独的层中定义?

javascript - 侧面会影响安装 Node 模块和更改 Node.js 版本吗?

node.js - 用 react 阅读卡夫卡的主题

node.js - Mongo 聚合查询提取最近 7 天的数据 (node.js)

node.js - NodeJS 子进程 EXEC 命令失败,NVM 权限被拒绝 OSX

node.js - sh : 1: cucumber. js:未找到

node.js - 为什么 nvm 命令以 root 身份安装,但在 vagrant bootstrap.sh 期间也找不到?

node.js - 如何在docker中安装nvm?