Handle Error: craco start in React

How to handle Error: craco start in React?

  Shubham Verma      February 23, 2022


Handle Error: craco start in React

Handle Error: craco start in React

Craco I was facing a very unique error in React application, the error was releted to craco start. I was unable to run my application, when I ran the project with npm start, it was throwing error and error was not described. So I did research on this and found the solution. In this article, we will look about the solutions.

What is CRACO?

CRACO stands for Create React App Configuration Overide. The CRACO is another layer added by React on the top of Create React App.
Basically, craco used to customize the configuration of Create React App. By using craco, you can have all the benefits of create-react-app and advantages of customization without using 'eject' by adding a single configuration file. You can customize your eslint, babel, postcss configurations and many more. You need to do is create your app using create-react-app and customize the configuration file. That's it.

What error I was facing?

When I was trying to run npm start, I was facing following error:

Handle Error: craco start in React

Handle Error: craco start in React


Solution 1:

I explored a lot then I found following solution, You need to try step by step:

Step 1:


Step 2:


Step 3:


Step 4:


The above steps should be enough to fix the problem, but in some cases, If this has not fixed, there are a few other things you can try:

Solution 2: Switch NPM to YARN

Step 5:


Now I hope your issue will be fixed, but if it is not fixed then you need to try solution 2.

Solution 3:

If nothing else helps you to fixed the craco start issue, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project directory. That would permanently disable this preflight check in case you want to proceed anyway.

Solution 4:

You can run your app using following command: SKIP_PREFLIGHT_CHECK=true npm start Now, I am very sure that your problem will be solved.

Conclusion:

In this article, we have looked around what is craco and how we can get rid of the craco start arrors. We have tried 4 solutions to remove this craco start error. I hope this article will help you to proceed with your apps and codes.


Support our IDKBlogs team


Welcome to IDKBlogs.

If our contents help you and you learned from this platform, please consider supporting what we do.

Thank you.




Strongly Recommended Books For You:

Reading books opens the door to allow in more lights, If we want to know a man of rare intellect, try to know what books he/she reads.

For India:

For Other Countries (United States, United Kingdom, Spain, Italy, Germany, France, Canada, etc)


Thank you

I appreciate you taking the time to read this article. The more that you read, the more things you will know. The more that you learn, the more places you'll go. If you’re interested in Node.js or JavaScript this link will help you a lot.

If you found this article is helpful, then please share this article's link to your friends to whom this is required, you can share this to your technical social media groups also. You can follow us on our social media page for more updates and latest article updates.
To read more about the technologies, Please subscribe us, You'll get the monthly newsletter having all the published article of the last month.



Funny Programming | Idkblogs.com | Shubham Verma

👈

Enjoyed this moment?