create-react-app is a starter-kit for creating React applications with no build configuration. If you’re getting started with React, use this to automate the build of your application. There isn't any configuration file, and react-scripts is the only extra build dependency in your package.json file. Your environment will have everything you need to build a modern React application.
Questions tagged [create-react-app]
5893 questions
3
votes
2 answers
Add craco webpack plugin by condition for create react app
I am using craco with create react app and I would like to add a plugin only in DEV mode or by ENV Var
my craco.config looks is:
const path = require('path');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
module.exports = ()…

Tuz
- 1,810
- 5
- 29
- 58
3
votes
2 answers
CRA: Extract particularly big modules into separate chunks?
Using latest CRA. All node_modules are bundled into a separate chunk, which is nice. But that chunk is still over several megabytes in size. At the same time I do not see any option to override or customize chunking logic in CRA. Basically I would…

jayarjo
- 16,124
- 24
- 94
- 138
3
votes
0 answers
Create React App test coverage report doesn't cover all files inside /src
Application is created with npx create-react-app my-app. Running coverage report with npm test -- --coverage doesn't cover all files inside /src folder when checked with html file generated by istanbul, ie., project > coverage > lcov-report >…

Suraj A J
- 359
- 4
- 19
3
votes
2 answers
Multi module projects with create-react-app
I have a project called Frontend-Core-Components which contains my App component.
I have another project (let's just call it Alpha for now) which containsAlphaApiService, which I pass to the App component via its props, I do this in Alpha's…

Paul McLoughlin
- 2,279
- 2
- 18
- 24
3
votes
2 answers
I can't run a docker container of my reactjs app
I'm new to Docker and I tried to run a container of the create-react-app image so these are the steps that I have done:
npx create-react-app frontend
I created a Dockerfile.dev like below:
FROM node:alpine
WORKDIR '/app'
COPY package.json .
RUN…

noussair
- 81
- 10
3
votes
3 answers
command "npx create-react-app project" not generating project
All of a sudden I started getting this error when I type
npx create-react-app project
The error is :
Invalid "exports" main target "index.js" defined in the package config…

Swaraj Gaidhane
- 31
- 2
3
votes
2 answers
create-react-app/express Proxy error: Could not proxy request (ECONNRESET)
I have created a react app using create-react-app and an express server using express-generator. My react app is running on http://localhost:3000 and my express server is running on http://localhost:8080. In my component I am making a POST fetch…

kachow6
- 1,134
- 12
- 15
3
votes
1 answer
Image not cache in create-react-app project
I know most of the image in website will be either memory or disk cache, but why all of my images is not cache everytime I refresh my page.
It is default in development server? or It cause by bug?
I create my react project with create-react-app

Wesley Loh
- 153
- 2
- 11
3
votes
1 answer
create-react-app: use a proxy for Jest tests
I want to use an actual API for my react Jest tests. Because the test environment is JSDom, I can't make cross-origin requests. In development this is easily solved by specifying a proxy in the package.json file, however this does not apply to the…

Marnix.hoh
- 1,556
- 1
- 15
- 26
3
votes
2 answers
How to change outputDir (/build) of TypeScript code in create-react-app
I am using create-react-app with TypeScript template to manage my React project (yarn create react-app my-app --template typescript)
When I run react-scripts build my code is built into /build folder. How to customize this directory?
I tried to…

Baterka
- 3,075
- 5
- 31
- 60
3
votes
1 answer
Understanding the meaning if >0.2% and finding the IE versions supported
The browserslist section in my package.json says:
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
">0.2%",
"not dead",
"not op_mini all"
]
}
I have a question here. I know…

Amanda
- 2,013
- 3
- 24
- 57
3
votes
2 answers
Skaffold and create-react-app stopped working
Been working fine for months and quit working two days ago. Don't recall changing anything in the .yamls.
Basically, when I start up the create-react-app, the create-react-app client just starts, fails and restarts.
I've tried:
Reverting to a…

cjones
- 8,384
- 17
- 81
- 175
3
votes
4 answers
Reactjs development server won't start on macos catalina
I am trying to create a new react.js project with create-react-app. When I execute yarn start, the development server doesn't start and the console gives me this message :
Starting the development server...
dyld: lazy symbol binding failed: Symbol…

thecassion
- 506
- 1
- 7
- 19
3
votes
1 answer
Cypress test fails to run when importing from source code of CRA+TS app
One of my Cypress tests fails to run when it tries to import from a file in the source code of a create-react-app src directory.
The test looks like:
// cypress/integration/this-fails.js
import { MY_CONSTANT } from…

brietsparks
- 4,776
- 8
- 35
- 69
3
votes
0 answers
React app does not show favicon after build
I created my react app with create-react-app.
When using npm start it works fine
But when I used npm run-script build and host it via 000webhostapp, the favicon does not show. Below is the code from index.html after build

Huy Nguyen
- 520
- 2
- 7
- 20