環境設定したのでそのメモです。
複数バージョンを切り替えられたほうがいいかなーと思ったので、以下の手順で設定しました。
nvmインストール
まずnvm
をインストールする
Node Version Manager (nvm) for Windows
https://qiita.com/spiderx_jp/items/2ddc2f8a5a010ff78b1d
https://github.com/coreybutler/nvm-windows
インストール後
C:\>nvm list
No installations recognized.
C:\>nvm list available
| CURRENT | LTS | OLD STABLE | OLD UNSTABLE |
|--------------|--------------|--------------|--------------|
| 14.1.0 | 12.16.3 | 0.12.18 | 0.11.16 |
| 14.0.0 | 12.16.2 | 0.12.17 | 0.11.15 |
| 13.14.0 | 12.16.1 | 0.12.16 | 0.11.14 |
| 13.13.0 | 12.16.0 | 0.12.15 | 0.11.13 |
| 13.12.0 | 12.15.0 | 0.12.14 | 0.11.12 |
| 13.11.0 | 12.14.1 | 0.12.13 | 0.11.11 |
| 13.10.1 | 12.14.0 | 0.12.12 | 0.11.10 |
| 13.10.0 | 12.13.1 | 0.12.11 | 0.11.9 |
| 13.9.0 | 12.13.0 | 0.12.10 | 0.11.8 |
| 13.8.0 | 10.20.1 | 0.12.9 | 0.11.7 |
| 13.7.0 | 10.20.0 | 0.12.8 | 0.11.6 |
| 13.6.0 | 10.19.0 | 0.12.7 | 0.11.5 |
| 13.5.0 | 10.18.1 | 0.12.6 | 0.11.4 |
| 13.4.0 | 10.18.0 | 0.12.5 | 0.11.3 |
| 13.3.0 | 10.17.0 | 0.12.4 | 0.11.2 |
| 13.2.0 | 10.16.3 | 0.12.3 | 0.11.1 |
| 13.1.0 | 10.16.2 | 0.12.2 | 0.11.0 |
| 13.0.1 | 10.16.1 | 0.12.1 | 0.9.12 |
| 13.0.0 | 10.16.0 | 0.12.0 | 0.9.11 |
| 12.12.0 | 10.15.3 | 0.10.48 | 0.9.10 |
This is a partial list. For a complete list, visit https://nodejs.org/download/release
C:\>nvm arch
System Default: 64-bit.
Currently Configured: -bit.
node.js インストール
C:\>nvm install latest
Downloading node.js version 14.1.0 (64-bit)...
Complete
Creating C:\Users\xxx\AppData\Roaming\nvm\temp
Downloading npm version 6.14.4... Complete
Installing npm v6.14.4...
Installation complete. If you want to use this version, type
nvm use 14.1.0
C:\>nvm use 14.1.0
Now using node v14.1.0 (64-bit)
C:\>node --version
v14.1.0
C:\>nvm install 12.16.3
Downloading node.js version 12.16.3 (64-bit)...
Complete
Creating C:\Users\xxx\AppData\Roaming\nvm\temp
Downloading npm version 6.14.4... Complete
Installing npm v6.14.4...
Installation complete. If you want to use this version, type
nvm use 12.16.3
C:\>nvm list
* 14.1.0 (Currently using 64-bit executable)
12.16.3
C:\>nvm use 12.16.3
Now using node v12.16.3 (64-bit)
C:\>node -v
v12.16.3
C:\>npm -v
6.14.4
C:\>
Visual Studio Code の設定
以下参照
Visual Studio CodeとNode.jsの導入について
https://qiita.com/GRGSIBERIA/items/b8cd4a2b3635d1bb0391
その他、参考サイト
Configuring your Windows development environment
https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules