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

2 min read
Table of Contents

以前、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

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

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

My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


More Posts

Comments