両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
javascript:nodejs [2023/02/09 05:42] – [トラブルシューティング] ともやん | javascript:nodejs [2023/09/26 13:02] (現在) – [Node.js のバージョン確認] ともやん |
---|
| |
===== Linux - anyenv (nodenv) 編 ===== | ===== Linux - anyenv (nodenv) 編 ===== |
[[linux:anyenv#nodenv|anyenv - rbenv スタイルのオールインワン環境マネージャー]] を参照のこと。\\ | 詳しくは [[linux:anyenv#nodenv|anyenv - rbenv スタイルのオールインワン環境マネージャー]] を参照。\\ |
\\ | \\ |
**anyenv-update** プラグインで **nodenv** と **node-build** をコマンド一発で最新化する😉\\ | **anyenv-update** プラグインで **nodenv** と **node-build** をコマンド一発で最新化する😉\\ |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
<b class=GRN>Updating 'nodenv'... | <b class="BOLD HIG">Updating 'nodenv'... |
Updating 'nodenv/node-build'...</b> | Updating 'nodenv/node-build'...</b> |
<b class=GRN>|</b> From https://github.com/nodenv/node-build | <b class="BOLD HIG">|</b> From https://github.com/nodenv/node-build |
<b class=GRN>|</b> * [new branch] latest-scraped-definitions -> origin/latest-scraped-definitions | <b class="BOLD HIG">|</b> * [new branch] latest-scraped-definitions -> origin/latest-scraped-definitions |
<b class=GRN>Updating 'nodenv/nodenv-vars'... | <b class="BOLD HIG">Updating 'nodenv/nodenv-vars'... |
Updating 'anyenv manifest directory'...</b> | Updating 'anyenv manifest directory'...</b> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<b class=GRN>$</b> <b class=HIY>nvm</b> install 14.17.5 64 | <b class=GRN>$</b> <b class=HIY>nvm</b> install 18.18.0 64 |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
Downloading node.js version 14.17.5 (64-bit)... | Downloading node.js version 18.18.0 (64-bit)... |
| Extracting node and npm... |
Complete | Complete |
Creating C:\Users\tomoyan\scoop\persist\nvm\nodejs\temp | npm v9.8.1 installed successfully. |
| |
Downloading npm version 6.14.14... Complete | |
Installing npm v6.14.14... | |
| |
Installation complete. If you want to use this version, type | Installation complete. If you want to use this version, type |
| |
nvm use 14.17.5 | nvm use 18.18.0 |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<b class=GRN>$</b> <b class=HIY>nvm</b> use 14.17.5 64 | <b class=GRN>$</b> <b class=HIY>nvm</b> use 18.18.0 64 |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
Now using node v14.17.5 (64-bit) | Now using node v18.18.0 (64-bit) |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
v14.17.5 | v18.18.0 |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
| |
==== トラブルシューティング ==== | ===== トラブルシューティング ===== |
| |
=== 1 high severity vulnerability (重大度の高い脆弱性 1 件) が発生する😨 === | ==== 1 high severity vulnerability (重大度の高い脆弱性 1 件) が発生する😨 ==== |
| 特に理由がない場合は Node.js の[[https://nodejs.org/ja/|最新の LTS]] を使うべきです🤔\\ |
| 以下は古い 16.17.0 LTS を使っていて発生しました😅\\ |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
| <b class=GRN>$</b> <b class=HIY>npm</b> install <b class=HIK>-g</b> firebase-tools |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
</WRAP> | </WRAP> |
| |
=== ERROR open \settings.txt: The system cannot find the file specified. が発生する😱 === | ==== npm notice New minor version of npm available! ... 通知される🤔 ==== |
| Node.js パッケージのインストール時に **npm notice** 通知がされる場合。\\ |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <b class=GRN>$</b> <b class=HIY>npm</b> install <b class=HIK>-g</b> firebase-tools |
| </pre></html></WRAP> |
| <WRAP color_result><html><pre> |
| <b class="WHI BBLK">npm</b> <b class="BLK BYEL">WARN</b> <b class=MAG>deprecated</b> har-validator@5.1.3: this library is no longer supported |
| <b class="WHI BBLK">npm</b> <b class="BLK BYEL">WARN</b> <b class=MAG>deprecated</b> debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) |
| <b class="WHI BBLK">npm</b> <b class="BLK BYEL">WARN</b> <b class=MAG>deprecated</b> uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. |
| <b class="WHI BBLK">npm</b> <b class="BLK BYEL">WARN</b> <b class=MAG>deprecated</b> request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 |
| |
| added 703 packages in 24s |
| |
| 48 packages are looking for funding |
| run `npm fund` for details |
| <b class="WHI BBLK">npm</b> <b class="CYN BBLK">notice</b> |
| <b class="WHI BBLK">npm</b> <b class="CYN BBLK">notice</b> New <b class=HIR>minor</b> version of npm available! <b class=RED>9.5.0</b> -> <b class=GRN>9.6.4</b> |
| <b class="WHI BBLK">npm</b> <b class="CYN BBLK">notice</b> Changelog: <b class=CYN>https://github.com/npm/cli/releases/tag/v9.6.4</b> |
| <b class="WHI BBLK">npm</b> <b class="CYN BBLK">notice</b> Run <b class=GRN>npm install -g npm@9.6.4</b> to update! |
| <b class="WHI BBLK">npm</b> <b class="CYN BBLK">notice</b> |
| </pre></html></WRAP> |
| </WRAP> |
| |
| **npm notice** 通知に従って npm パッケージを更新する🤔\\ |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <b class=GRN>$</b> <b class=HIY>npm</b> install <b class=HIK>-g</b> npm@9.6.4 |
| </pre></html></WRAP> |
| <WRAP color_result><html><pre> |
| |
| removed 1 package, and changed 43 packages in 11s |
| |
| 18 packages are looking for funding |
| run `npm fund` for details |
| </pre></html></WRAP> |
| </WRAP> |
| |
| ==== ERROR open \settings.txt: The system cannot find the file specified. が発生する😱 ==== |
[[git>coreybutler/nvm-windows/issues/22|ERROR open \settings.txt: · Issue #22 · coreybutler/nvm-windows]]\\ | [[git>coreybutler/nvm-windows/issues/22|ERROR open \settings.txt: · Issue #22 · coreybutler/nvm-windows]]\\ |
<WRAP color_term> | <WRAP color_term> |