nodejs 版本管理 nodist

用過node的朋友都知道,node版本更新非??欤欢_發(fā)用到的node版本不一定會(huì)統(tǒng)一,為了保證環(huán)境一樣,一個(gè)nodejs包管理非常重要。這種包管理器,需要不但能夠快速簡潔下載各個(gè)版本的node包,更加需要能夠進(jìn)行版本的切換。
筆者環(huán)境:windows10 64位
筆者適用了 nvm, nvm-windows,n,以及nodist

前三者都是雖然都用windows版本,但是其兼容性較差,在筆者環(huán)境中老是出現(xiàn)各種bug,一番折騰后,仍然不得解。時(shí)間就是生命,當(dāng)用到nodist之后,感覺非常棒
附上鏈接:
https://github.com/marcelklehr/nodist

以下是nodist的命令,筆者默默做個(gè)筆記

nodist

Lists installed versions highlighting the active ones.

nodist global 4.x

Sets the global node version requirement

nodist local 4.x

Sets the node version requirement per directory (including all subdirectories).

nodist env 4.x

Sets the node version requirement per terminal.

nodist npm global 3.x

Set global npm version requirement.

nodist npm global match

Tell nodist to always choose the npm version that matches the current node version.
(the current node version may be determined by env, local or global requirements)

nodist npm local 2.x

Set the npm version requirement for the current directory.

nodist npm env 2.x

Set the npm version requirement for the current terminal environment.

call nodist env 4.x

In a batch script use call.

nodist dist

Lists all available node versions.

nodist + 4.x

Just checks, if the version is installed and installs it if not.

nodist + all

will install everything.

nodist - 4.1.1

Removes a version.

nodist --help

Displays a complete list of commands with examples.
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容