react.jsが急に、突然インストールできなくなった

reactが急にインストールできなくなったので、とりあえずインストールまで頑張った。

目次

以前、reactをインストールする方法を書いたが、今日(2021年12月22日)急にインストールができなくなった。

react でプロジェクトを作成する

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

というエラーが出てくる。

なにうえ、と調べるといくつかヒットした。

キャッシュを消せとか、色々出てきたので、検索して試してみるといいと思われる、が。

私にはどの方法もうまくいかなかった。

で、結局うまくいったのは…下記の通り。

これが正解…?

npx clear-npx-cache

C:\Users\{name}\AppData\Roaming\npm-cache 削除

npm init

npx create-react-app myapp

これが正解なのだろうか。

情報をさらに調べてみる。

次に読むおすすめ記事

Angular Material UI でカスタムカラーを設定する。

react でプロジェクトを作成する

JavaScriptでUnary plus (+)を使いかっこよくNumber型に変換する

letの仕様に関する知識を問うJavaScriptの問題

react を適当に触って確かめてみる。

この記事に対するコメント

お気軽にコメントを下さい

メールアドレスが公開されることはありません。 が付いている欄は必須項目です