LoginSignup
2
1

More than 3 years have passed since last update.

create-react-appが動作しなくなった

Posted at

概要

create-react-appしようとしたら以下のエラーが出て動作しなくなりました
困った...

❯ yarn create react-app my-app
yarn create v1.17.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Installed "create-react-app@3.1.1" with binaries:
      - create-react-app
[#####################################################################################################################################################] 149/149
Creating a new React app in /Users/****/Desktop/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.17.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error eslint@6.1.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1". Got "11.9.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

解決方法

翻訳無いとほぼ何書いてあるか分からなかったけどこれで解決しました
error eslint@6.1.0: The engine "node" is incompatible with this module. - 掘金

手順

npmのキャッシュを削除する

sudo npm cache clean -f

nをインストールする

sudo npm install -g n


公式の最新のバージョンをインストールする

sudo n stable

npmの最新バージョンをインストールする

sudo npm install npm@latest

以上の手順で無事動くようになりました

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1