react.jsが急に、突然インストールできなくなった
投稿日:2021年12月22日
最終更新日:2023年02月09日
reactが急にインストールできなくなったので、とりあえずインストールまで頑張った。
目次
以前、reactをインストールする方法を書いたが、今日(2021年12月22日)急にインストールができなくなった。
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
これが正解なのだろうか。
情報をさらに調べてみる。
- # JavaScript
- # react
次に読むおすすめ記事
Angular Material UI でカスタムカラーを設定する。
何が面倒って、アイキャッチ画像を設定するほど面倒なことはない
この記事に対するコメント