Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?
@yohei_nakamura

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

More than 1 year has passed since last update.

概要

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

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

1
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
fixer-inc
Microsoft Azureの24/365フルマネージドサービス「cloud.config」を中核とするクラウドソリューションを提供。最先端のテクノロジーで、お客様の新たな挑戦を成就します。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
1
Help us understand the problem. What is going on with this article?