| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
| linux:anyenv [2024/03/04 05:15] – [node のインストール] ともやん | linux:anyenv [2025/09/25 15:34] (現在) – [インストール] ともやん |
|---|
| |
| ==== インストール ==== | ==== インストール ==== |
| | <WRAP round tip 90% minfont_12> |
| | pnpm で Node.js を管理したい場合は [[javascript:pnpm|pnpm - 高速、かつディスク容量効率が良いパッケージマネージャー]] を参照のこと...😉\\ |
| | \\ |
| | nodenvを削除すると pnpm 管理になる😉\\ |
| | <WRAP color_term> |
| | <WRAP color_command><html><pre> |
| | <font color="#0087FF"><b>$</b></font> <font color="#26A269">nodenv</font> versions |
| | </pre></html></WRAP> |
| | <WRAP color_result><html><pre> |
| | system |
| | 18.14.0 |
| | 18.15.0 |
| | 18.18.0 |
| | * 20.17.0 (set by /home/tomoyan/.anyenv/envs/nodenv/version) |
| | </pre></html></WRAP> |
| | <WRAP color_command><html><pre> |
| | <font color="#0087FF"><b>$</b></font> <font color="#26A269">anyenv</font> uninstall nodenv |
| | </pre></html></WRAP> |
| | <WRAP color_result><html><pre> |
| | anyenv: remove /home/tomoyan/.anyenv/envs/nodenv? y |
| | </pre></html></WRAP> |
| | </WRAP> |
| | |
| | </WRAP> |
| | \\ |
| **Node.js** をインストールするための **nodenv** をインストールする。\\ | **Node.js** をインストールするための **nodenv** をインストールする。\\ |
| <WRAP color_term> | <WRAP color_term> |
| <WRAP color_term> | <WRAP color_term> |
| <WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
| <font color="#FF8700"><b>$</b></font> <font color="#4E9A06">nodenv</font> install 20.11.1 | <font color="#0087FF"><b>$</b></font> <font color="#26A269">nodenv</font> install 20.17.0 |
| </pre></html></WRAP> | </pre></html></WRAP> |
| <WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
| Downloading node-v20.11.1-linux-x64.tar.gz... | To follow progress, use 'tail -f /tmp/node-build.20240823063620.195473.log' or pass --verbose |
| -> https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.gz | Downloading node-v20.17.0-linux-x64.tar.gz... |
| Installing node-v20.11.1-linux-x64... | -> https://nodejs.org/dist/v20.17.0/node-v20.17.0-linux-x64.tar.gz |
| Installed node-v20.11.1-linux-x64 to /home/tomoyan/.anyenv/envs/nodenv/versions/20.11.1 | Installing node-v20.17.0-linux-x64... |
| | Installed node-v20.17.0-linux-x64 to /home/tomoyan/.anyenv/envs/nodenv/versions/20.17.0 |
| </pre></html></WRAP> | </pre></html></WRAP> |
| |
| <WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
| <font color="#FF8700"><b>$</b></font> <font color="#4E9A06">nodenv</font> rehash | <font color="#0087FF"><b>$</b></font> <font color="#26A269">nodenv</font> rehash |
| <font color="#FF8700"><b>$</b></font> <font color="#4E9A06">nodenv</font> global 20.11.1 | <font color="#0087FF"><b>$</b></font> <font color="#26A269">nodenv</font> global 20.17.0 |
| <font color="#FF8700"><b>$</b></font> <font color="#4E9A06">nodenv</font> versions | <font color="#0087FF"><b>$</b></font> <font color="#26A269">nodenv</font> versions |
| </pre></html></WRAP> | </pre></html></WRAP> |
| <WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
| * 20.11.1 (set by /home/tomoyan/.anyenv/envs/nodenv/version) | * 20.17.0 (set by /home/tomoyan/.anyenv/envs/nodenv/version) |
| </pre></html></WRAP> | </pre></html></WRAP> |
| |
| <WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
| <font color="#FF8700"><b>$</b></font> <font color="#4E9A06">node</font> <font color="#75507B">-v</font> | <font color="#0087FF"><b>$</b></font> <font color="#26A269">node</font> <font color="#A347BA">-v</font> <font color="#12488B"><b>&&</b></font> <font color="#26A269">npm</font> <font color="#A347BA">-v</font> <font color="#12488B"><b>&&</b></font> <font color="#26A269">npx</font> <font color="#A347BA">-v</font> <font color="#12488B"><b>&&</b></font> <font color="#26A269">npm</font> <font color="#A347BA">-g</font> list |
| </pre></html></WRAP> | </pre></html></WRAP> |
| <WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
| v20.11.1 | v20.17.0 |
| </pre></html></WRAP> | 10.8.2 |
| | 10.8.2 |
| <WRAP color_command><html><pre> | /home/tomoyan/.anyenv/envs/nodenv/versions/20.17.0/lib |
| <font color="#FF8700"><b>$</b></font> <font color="#4E9A06">npm</font> <font color="#75507B">-v</font> | ├── corepack@0.29.3 |
| </pre></html></WRAP> | └── npm@10.8.2 |
| <WRAP color_result><html><pre> | |
| 10.2.4 | |
| </pre></html></WRAP> | |
| | |
| <WRAP color_command><html><pre> | |
| <font color="#FF8700"><b>$</b></font> <font color="#4E9A06">npx</font> <font color="#75507B">-v</font> | |
| </pre></html></WRAP> | |
| <WRAP color_result><html><pre> | |
| 10.2.4 | |
| </pre></html></WRAP> | |
| | |
| <WRAP color_command><html><pre> | |
| <font color="#FF8700"><b>$</b></font> <font color="#4E9A06">npm</font> <font color="#75507B">-g</font><font color="#999999"> list</font> | |
| </pre></html></WRAP> | |
| <WRAP color_result><html> | |
| <pre>/home/tomoyan/.anyenv/envs/nodenv/versions/20.11.1/lib | |
| ├── corepack@0.23.0 | |
| └── npm@10.2.4 | |
| </pre></html></WRAP> | </pre></html></WRAP> |
| </WRAP> | </WRAP> |