サムネイル

$ npx create-react-appができなくなってしまった。。。

はじめに

おはようございます。こんにちは。こんばんは。
Watatakuです。
突然ですが、$ npx creat-react-app ができなくなりました。

$ npx create-react-app my-app
Need to install the following packages:
  create-react-app
Ok to proceed? (y) y

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/


は?

とりあえず、指示通りやる

$ npm uninstall -g create-react-app

up to date, audited 1 package in 237ms

found 0 vulnerabilities


無理。。。

ちょっと待て・・・!!

Need to install the following packages:
  create-react-app


あっ・・・
ちゃんとエラー見よな。。。

解決法

キャッシュクリアする。

$ npx clear-npx-cache


参考

npx create-react-app できない時