where is create-react-app webpack config and files?

If you want to find webpack files and configurations go to your package.json file and look for scripts You will find that scripts object is using a library react-scripts Now go to node_modules and look for react-scripts folder react-script-in-node-modules This react-scripts/scripts and react-scripts/config folder contains all the webpack configurations.

Trying to use fetch and pass in mode: no-cors

I can hit this endpoint, http://catfacts-api.appspot.com/api/facts?number=99 via Postman and it returns JSON Additionally I am using create-react-app and would like to avoid setting up any server config. In my client code I am trying to use fetch to do the same thing, but I get the error: No ‘Access-Control-Allow-Origin’ header is present on the requested … Read more

What exactly is the ‘react-scripts start’ command?

create-react-app and react-scripts react-scripts is a set of scripts from the create-react-app starter pack. create-react-app helps you kick off projects without configuring, so you do not have to setup your project by yourself. react-scripts start sets up the development environment and starts a server, as well as hot module reloading. You can read here to see what everything it does for … Read more

How to fix missing dependency warning when using useEffect React Hook

If you aren’t using fetchBusinesses method anywhere apart from the effect, you could simply move it into the effect and avoid the warning If however you are using fetchBusinesses outside of render, you must note two things Is there any issue with you not passing fetchBusinesses as a method when it’s used during mount with its enclosing closure? Does … Read more

Error: ‘node-sass’ version 5.0.0 is incompatible with ^4.0.0

TL;DR npm uninstall node-sass npm install [email protected] Or, if using Yarn (default in newer CRA versions) yarn remove node-sass yarn add [email protected] Edit2: sass-loader v10.0.5 fixes it. The problem is you might not be using it as a project dependency, but more as a dependency of your dependencies. CRA uses a fixed version, angular-cli locks to node-sass v4, and so on. … Read more

error code: 523