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

ng new my-appでのエラーを解決する方法

$
0
0
Angular公式の基礎講座のようなものをやろうとしたときに、ng new my-appというコマンドを叩いたらエラーが出た。 ng new my-appを叩いた時のエラー $ ng new my-app ^[[ANode.js version v16.2.0 detected. The Angular CLI requires a minimum Node.js version of either v12.20, v14.15, or v16.10. Please update your Node.js version or visit https://nodejs.org/ for additional instructions. このようなエラー。翻訳してみるとこのような内容だった。 Angular CLIには、Node.jsのバージョンが最低でもv12.20、v14.15、またはv16.10のいずれかが必要です。 Node.jsのバージョンを更新するか、https://nodejs.org/ で詳しい説明をご覧ください。 解決手順 $ nodebrew ls-remote インストール可能なバージョンを確認する。 $ nodebrew install-binary v16.10.0 希望のバージョンをインストールする。 v16.10.0をインストールした。 $node -v v16.10.0 これでv.16.10.0というバージョンをインストールすることができた。 これでngコマンドというものが使えるようになったっぽい。 ngコマンドを実行してみる $ ng new my-app ? Would you like to add Angular routing? Yes おー。動くようになった。

Viewing all articles
Browse latest Browse all 9140

Trending Articles