Questions tagged [react-scripts]

Package containing various scripts for running applications created via create-react-app

Package containing various scripts for running applications created via create-react-app

501 questions
12
votes
3 answers

How does react-create-app/react-scripts find the entry point?

In this tutorial, how does npm start find the src/index/js to star the render? I can't find the configuration of this anywhere.
stackjlei
  • 9,485
  • 18
  • 65
  • 113
11
votes
2 answers

Cannot use JSX unless the '--jsx' flag is provided when "jsx" is "react-jsx"

typescript throws: Cannot use JSX unless the '--jsx' flag is provided.ts(17004) After changing tsconfig.json jsx to react-jsx, jsx works. yarn start changes tsconfig.json to react-jsx again. react-scripts was updated to…
FelHa
  • 1,043
  • 11
  • 24
11
votes
2 answers

Trigger hard cache refresh when index.html changes in create-react-app deployment

I'm currently building and deploying my create-react-app site using "react-scripts build", and then copying the contents of the build directory to an apache web directory. The web directory contains an index.html file, which points to the compiled…
Dan
  • 1,125
  • 1
  • 13
  • 22
10
votes
7 answers

Yarn Start Command failed with exit code 1

I create react app with create-react-app and install react-admin . when I want to start development server with yarn start throw an error unhand-led 'error' event and say Command failed with exit code 1 I search a lot but nothing helped. See the…
10
votes
1 answer

Why is npm react-scripts producing a syntax error when I run `npm run start`?

So I've been working on a full stack React app for a few months now. For some reason, seemingly out of no where, when I tried to run npm run start on the command line, it produced the following error; // npm run start > pair@0.1.0 start…
user10750437
  • 385
  • 4
  • 10
10
votes
1 answer

Using ts-jest with create-react-app

When using create-react-app with react-scripts-ts to use TypeScript, running the tests with the --coverage flag leads to incorrect coverage reports. Is there any way to integrate ts-jest so that the coverage reports will be accurate? Below is my…
holtc
  • 1,780
  • 3
  • 16
  • 35
9
votes
3 answers

Craco does not work properly with react-scripts@5.0.0

After upgrading react-scripts to v5, craco start does not work properly. App starts with no error but in browser, there is a blank page and if i open inspector, i only see index.html codes not react codes. It was working well with…
9
votes
0 answers

Create-react-app console shows chunk files

I would like to debug some errors happening during my React development. As you can see I can't see the source files. I am using create-react-app to create my project. I did not change anything else. Is this caused by webpack? It is happening in…
Dogacel
  • 113
  • 1
  • 7
9
votes
2 answers

How to prevent inheriting packages from parent node_modules

First I will give some context to the problem. I am developing an npm library. Inside the project folder, I have another folder called "example", for testing the library. The structure looks like below. |- node_modules/ |- src/ |- example/ | |-…
Pubudu Dodangoda
  • 2,742
  • 2
  • 22
  • 38
9
votes
3 answers

How can I make `react-scripts build` quiet?

I am working with a repo with a number of Node packages created with create-react-app, all of which are built and tested by the CI system. Each package's build/test, done with react-scripts build followed by react-scripts test --silent, is currently…
cjs
  • 25,752
  • 9
  • 89
  • 101
8
votes
1 answer

Typescript does not error on compilation with create react app

I have set up a new project using npx create-react-app my-app --template typescript and I haven't changed any config settings. If I type some code that has a TS error, my IDE (VS Code) will show the error. However, when I run start/build I do not…
user195257
  • 3,186
  • 5
  • 36
  • 49
7
votes
3 answers

React-tooltip doesn't close when mouse leave

I have used react-tooltip on a login page and set the tooltip to trigger on mouseclick. But I want to tooltip getting off when the mouse leaves the element. I couldn't find a way to do it. I want this above showed tooltip remove when the mouse…
7
votes
0 answers

Getting a filename from react-scripts build?

I am using yarn to run react-scripts build on a private Typescript repository. The build fails with the following message: yarn build -v yarn run v1.22.17 $ react-scripts build -v Creating an optimized production build... Failed to compile. TS2322:…
Rob Rose
  • 1,806
  • 22
  • 41
7
votes
1 answer

Waiting for connectivity with react-scripts on ionic serve

I have an Ionic project, which works fine on my windows machine and friend's mac, but I got a problem on linux. The problem appears on ionic serve, it's infinitely Waiting for connectivity with react-scripts..., and appearing continues while it's…
ow11
  • 71
  • 2
7
votes
2 answers

npm run build is not minifying the reactJs project

I executed the npm command "npm run build" from the reactJs App root folder and "build' folder is generated with the below output in the console. File sizes after gzip: 646.8 KB build\static\js\2.d370d4e1.chunk.js 12.46 KB …
Nofi
  • 2,107
  • 1
  • 15
  • 23
1 2
3
33 34