Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8892

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

$
0
0

環境

  • 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

Viewing all articles
Browse latest Browse all 8892

Trending Articles