create-react-app error while using yarn 3

388 views Asked by At

I'm using yarn 3.2.0(latest) and node 17.6.0(latest)

As instructed in CRA documentation I ran yarn create react-app myapp. It completed installation and was able to start the app using yarn start. However after making changes to the App , I always get the following error

ERROR Failed to load config "react-app" to extend from. Referenced from: D:\myapp\package.json

If I install any packages, I get module not found error like below

ERROR in ./src/App.js 6:0-39 Module not found: Error: Can't resolve 'styled-components' in 'D:\myapp\src'

Anyone know what's going on?

1

There are 1 answers

0
Rimaz Mohommed On

I had a similar issue. And found that the reason why this was happening to me was due to my Antivirus. Try disabling your antivirus on windows if you have one and re-create your project and if that fixes your issue.