Create-react-app: Create react app start failed

Created on 27 Apr 2020  路  3Comments  路  Source: facebook/create-react-app

Describe the bug

I created a create-react-app using
npx create-react-app my_app

It created successfully.
But when go inside the folder and run npm start it gives me this error

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

"babel-loader": "8.1.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-loader was detected higher up in the tree:

D:\Work\projects\POCs\node_modules\babel-loader (version: 8.0.6)

Manually installing incompatible versions is known to cause hard-to-debug issues.

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "babel-loader" from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

Did you try recovering your dependencies?

I have tried the steps mentioned in the logs and in the error description. But no luck.
Some of them were invalid, like for example, there are no babel dependencies in package.json

Which terms did you search for in User Guide?

I have read the troubleshooting guide, but still no luck. Amazingly, I had created a cra yesterday and it was running well then, and it is running well even now. This problem seems to be appearing since few hours now.

Environment

I am using node v10.15.3 in my local windows 10

bug report needs triage stale

Most helpful comment

In your project folder make new file .env
and Add SKIP_PREFLIGHT_CHECK=true in that file

All 3 comments

In your project folder make new file .env
and Add SKIP_PREFLIGHT_CHECK=true in that file

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings