如何使用NVM设置默认节点版本? [英] How can the default node version be set using NVM?

查看:1018
本文介绍了如何使用NVM设置默认节点版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了具有两个节点版本的nvm(带有zsh shell的ubuntu):v6.11.5和v9.0.0,nvm中的默认版本为v9.0.0

I have installed nvm (ubuntu with zsh shell) with two node version: v6.11.5 and v9.0.0 and the default version in nvm is the v9.0.0

每次我都需要更改节点版本

Every time I need to change the node version

$ nvm list
         v6.11.5
->       v9.0.0
         system
default -> node (-> v9.0.0)
node -> stable (-> v9.0.0) (default)
stable -> 9.0 (-> v9.0.0) (default)


$ nvm v6

如何更改默认的nvm版本以定义v6.11.5?

How could I change the nvm version default to define v6.11.5?

推荐答案

(此处为nvm维护者)

(nvm maintainer here)

nvm alias default 6.11.5,如果您希望将其与该特定版本挂钩.

nvm alias default 6.11.5 if you want it pegged to that specific version.

您也可以执行nvm alias default 6.

无论哪种方式,您都希望升级到最新版本的nvm(在撰写本文时为v0.33.11)

Either way, you'll want to upgrade to the latest version of nvm (v0.33.11 as of this writing)

这篇关于如何使用NVM设置默认节点版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆