お問い合わせ

ブログ

これまでに経験してきたプロジェクトで気になる技術の情報を紹介していきます。

nodistを使ってwindowsでnodejsのバージョン管理

okuda Okuda 2 years

nodistをダウンロード

nodistのギットハブ https://github.com/nullivex/nodist/releases

これをダウンロード https://github.com/nullivex/nodist/releases/download/0.9.1/NodistSetup-v0.9.1.exe

インストーラーがすべて設定してくれます。

コマンドプロンプトで確認

バージョンのチェック

nodist -v
  #output
    0.9.1

インストール可能なNode.jsのバージョンの一覧

nodist dist
 #output
 ...
 14.15.0
 14.15.1
 15.0.0
 15.0.1
 15.1.0
 15.2.0
 15.2.1
 15.3.0

Node.jsをインストール

14.15.1をインストール

nodist + 14.15.1
 #output
 14.15.1 [===============] 55119/55119 KiB 100% 0.0s
 14.15.1

バージョンを指定

nodist 14.15.1
 #output
 14.15.1
 14.15.1 (global)

確認

node -v
 #output
 v14.15.1

npmのアップデート

バージョンのチェック

npm -v
 #output
 6.9.3

npmのアップデート

nodist npm global 6.13.4
 #output
 npm 6.13.4

nodistだとNode.jsと一緒にnpxがインストールされない問題を解決

npm i npx -g
 #output
 npm WARN npm npm does not support Node.js v14.15.1
 npm WARN npm You should probably upgrade to a newer version of node as we
 npm WARN npm can't make any promises that npm will work with this version.
 npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12, 13.
 npm WARN npm You can find the latest version at https://nodejs.org/
 C:\Program Files (x86)\Nodist\bin\npx -> C:\Program Files (x86)\Nodist\bin\node_modules\npx\index.js
 + npx@10.2.2
 added 493 packages from 654 contributors in 9.243s
nodistを使ってwindowsでnodejsのバージョン管理 2021-08-25 09:16:01

コメントはありません。

4468

お気軽に
お問い合わせください。

お問い合わせ
gomibako@aska-ltd.jp