斗士狗 2014-07-05 10:05 采纳率: 0%
浏览 330
已采纳

Nvm 总是在新的终端会话中"忘记"节点

Upon using a new terminal session in OS X, nvm forgets the node version and defaults to nothing:

$ nvm ls:

         .nvm
     v0.11.12
     v0.11.13

I have to keep hitting nvm use v.0.11.13 in every session:

         .nvm
     v0.11.12
->   v0.11.13

I've tried both the brew install, as well as the official installation script.

My .profile for the brew version:

#nvm
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh

And for the install.sh script:

$ curl https://raw.githubusercontent.com/creationix/nvm/v0.10.0/install.sh | bash

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

Any clue to what I'm doing wrong?

转载于:https://stackoverflow.com/questions/24585261/nvm-keeps-forgetting-node-in-new-terminal-session

  • 写回答

10条回答 默认 最新

  • ~Onlooker 2014-07-05 14:00
    关注

    Try nvm alias default. For example:

    $ nvm alias default 0.12.7

    This sets the default node version in your shell. Then verify that the change persists by closing the shell window, opening a new one, then: node --version

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(9条)

报告相同问题?

悬赏问题

  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录