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
34
votes
8 answers

React Typescript: Line 0: Parsing error: Cannot read property 'name' of undefined

Today suddenly I started to get build errors on a project built with Typescript. In a file that (or anything it references) hasn't been changed in weeks, I started to get: ./path/to/my/file.ts Line 0: Parsing error: Cannot read property 'name' of…
30
votes
6 answers

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree

Hello there I am getting some error in my terminal and its say i need to use 4.4.0 version and my current version is ... In my project my current typescript version is given below, "typescript": "^4.4.2", "typedoc": "^0.21.8", …
Barbie Doll
  • 401
  • 1
  • 4
  • 7
29
votes
4 answers

`react-scripts build' is using 1+ GB of RAM

I have a relatively simple React 15 website. It only has a few distinct pages, and it's mainly just text and some pictures. However, when I use react-scripts build to build the project for production deployment, I'm finding that the node process…
Dan
  • 1,125
  • 1
  • 13
  • 22
28
votes
3 answers

Tree shaking create-react-app?

I created my React app with create-react-app and now use TypeScript with create-react-app-typescript. Everything works ok, but the problem is - especially because I use the good but heavy material-ui - the size of the built bundle is quite big -…
mllm
  • 17,068
  • 15
  • 53
  • 64
21
votes
5 answers

BrowserslistError: Unknown browser kaios

I have updated my project to use the last versions of node and yarn, after this upgrade now my react project doesn't want to work with "browserslist". I run "yarn start" and get this error: ./src/assets/css/material-dashboard-react.css?v=1.2.0…
bomba1990
  • 437
  • 5
  • 15
18
votes
2 answers

How to debug `create-react-app`s in visual studio code?

I tried suggestions made here and in other places, but can't get the vscode debugger to work properly, I.E. breakpoints never become active and of course they don't break. The application is normally ran with npm start which calls react-scripts…
Petruza
  • 11,744
  • 25
  • 84
  • 136
17
votes
2 answers

Is it possible to disable TSLint in tslint.json?

I use react-scripts-ts to generate React App and it supplies TSLint. It seems like there's no option to tell react-scripts-ts to exclude TSLint from the build pipeline. Is it possible to disable TSLint via tslint.json? P.S. It's possible to…
Alexey Petrushin
  • 1,311
  • 3
  • 10
  • 24
16
votes
4 answers

Material-UI Rendering Bugs in production / build

I have big problems building my react-app. I am using material-ui/core v.4.10.2 on the normal react-scripts start dev-server everything works perfectly. But when built and served through Nginx or npm-module serve the rendering is not working…
Antax
  • 496
  • 6
  • 13
16
votes
5 answers

ReactJS Test - fsevents is not a function

I am trying to write test cases for my program and I heard good things about testing-library/react and jest-junit. I used npm to install both packages into my devDependencies and change my script for test: "test": 'react-scripts test" When I run npm…
H. Manner
  • 255
  • 1
  • 6
  • 14
16
votes
4 answers

create react app Configuration file after build app

I want a Config File (JSON) in root folder after build to config my app. like Translation and API Urls and ... Can I do this with create react app?
Hamid Sarani
  • 755
  • 1
  • 5
  • 15
15
votes
1 answer

How to get verbose log from react-scripts build script?

I upgraded to the react-scripts v5 and my build fails with an unuseful message: Creating an optimized production build... Failed to compile. Module not found: Error: Can't resolve '...' in '/project/src' As you can see it only tells me that there…
Hossein Fallah
  • 1,859
  • 2
  • 18
  • 44
14
votes
4 answers

postcss 7.0.0 - 8.2.9 Severity: moderate Regular Expression Denial of Service

When creating a new project under create-react-app, you get warnings straight away regarding a vulnerability found in postcss. Issue reported by npm: https://www.npmjs.com/advisories/1693 Related open issues can be found…
ale917k
  • 1,494
  • 7
  • 18
  • 37
14
votes
1 answer

How to manually configure a minimal setup for React without create-react-app?

I do not want to use create-react-app. So how can I configure a minimal working dev environment for a simple react app? Note: I know I could likely just include everything at runtime as JS (that is well documented), but I do not want this, as I…
rugk
  • 4,755
  • 2
  • 28
  • 55
14
votes
5 answers

React build run on server using pm2

I have compiled my react app using react-scripts build And it generated a build\ folder in the root directory of App. I am running the build\ folder using sudo serve -T -p 443 build/ This runs my React app successfully on HTTPS since I am passing…
RDoonds
  • 485
  • 2
  • 6
  • 19
12
votes
3 answers

How to fix npm package braces issue with react-scripts v2.1.5 when npm audit does nothing?

My NPM package in my react client folder is giving me 63 low vulnerabilities all dealing with the braces package mainly in the jest folder of the react-scripts package of version 2.1.5. NPM Audit fix doesn't work, what do I do? I've tried…
CrumrineCoder
  • 157
  • 1
  • 1
  • 7
1
2
3
33 34