2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Node.jsインストール備忘録

Posted at

環境

  • Windows 10 Pro
  • WSL (Windows Subsystem for Linux)

apt更新

$ sudo apt update
$ sudo apt dist-upgrade
$ sudo apt autoremove

nvmインストール

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

最新:https://github.com/nvm-sh/nvm

最新化

$ cd ~/.nvm
$ git pull origin master

起動

$ source ~/.bashrc
$ nvm --version

インストール可能なNode.jsの確認

$ nvm ls-remote

Node.jsのインストール


$ nvm install 12.16.3

使用するバージョンを選択

$ nvm use 12.16.3

npmのアップデート

npm update -g npm

npm初期化

$ cd /mnt/d/develop/<プロジェクト名> #プロジェクトのディレクトリを作成して移動
$ npm init                          #初期化
  • /mnt/d/ はWindowsから見た場合Dドライブ直下
  • npm init は全てEnterで進めてしまってOK
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?