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
1 answer
How to solve parsing error when export type in CRA typescript environment
I build application with CRA typescript template.
When I used this code, there is parsing error.
export type { BaseModalProps } from "./BaseModalProps"
Parsing error: Declaration or statement expected
These are part of my package.json and…

Changhoi Kim
- 61
- 2
3
votes
1 answer
Create-React-App .env file directory location (Non-root)
After creating a new web app with create-react-app (CRA), I need to include some environment files for configuring various endpoints. Noticed that CRA comes with the cool dotenv package all ready to go. There's only one problem with that - I would…

heyitsalec
- 192
- 4
- 19
3
votes
1 answer
How to transpile a node_module with webpack in a web worker?
I am trying to include a node module (primitive-ellipsoid) in my wepback project. The module is not transpiled to es5 so throws an error when used in the browser:
Uncaught Error: Module parse failed:…

kevzettler
- 4,783
- 15
- 58
- 103
3
votes
1 answer
How to disable react dev error panel which show 'Unhandled Rejection (Error):XXXXX'?
Unhandled Rejection (Error)
Unhandled Rejection (Error): User does not exist
(anonymous function)
src/service/index.ts:102
99 | if (customConfig.rawData) return res.data
100 | if (res.data.code != 0) {
101 | const message = res.data.msg ||…

Spray Lee
- 31
- 3
3
votes
0 answers
Generate type declarations for create-react-app
I can't seem to get my create-react-app with typescript to generate declaration files. A .d.ts file should be added to the build folder when building. Adding "declaration": true to the tsconfig.json didn't change it.
To reproduce create a new app…

Shoggomo
- 137
- 8
3
votes
1 answer
Uncaught SyntaxError: Unexpected token '<' while deploying create react app to firebase hosting
I'm trying to deploy my app to firebase hosting and I'm getting this error in the console Uncaught SyntaxError: Unexpected token '<' in several *.chunk.js files. I have already deployed my app to gh-pages and everything has worked just fine. Also I…

Nikita Yakunin
- 71
- 1
- 7
3
votes
0 answers
Separate react app builds for public site and admin panel
I’m working with a react app (CRA) that will be public to endusers, and additionally includes an admin panel to config it. I want to have only one app project, but two isolate builds that include only needed parts to deploy (public site over…

onsm7
- 161
- 2
- 2
- 3
3
votes
3 answers
How to set up create-react-app with local packages in src folder while using TypeScript?
I use TypeScript in my create-react-app project and use local private packages.
The packages are meant to be shared between multiple apps and have their own repositories.
I would like to have my local packages in src/packages folder.
Here is my…

Mike Cenker
- 93
- 1
- 5
3
votes
1 answer
How to load npm module type definition in Monaco using Webpack and react create-react-app
I wanted to load some module type definitions in Monaco inside a react app for tutorial purposes.
I actually managed to get it working after much pain but in a very hacky way. So I'm not asking how to do it, but rather, how to do it right.
The part…

jfmmm
- 381
- 1
- 3
- 15
3
votes
1 answer
Create React App: Set HTTPS flag in package.json based on .env variable
To enable create react app to run in SSL mode, we need to set HTTPS=true in the package.json like this
"start": "HTTPS=true react-scripts start",
However, I would like this only in production and not when development happens locally. I have a…

Swamy g
- 2,106
- 4
- 23
- 35
3
votes
0 answers
Want to use selenium-webdriver at create-react-app
I want to use selenium-webdriver at React.
So npx create-react-app my-app to create react app. And use npm i selenium-webdriver to use selenium-webdriver.
Next download chromedriver.
I want to test Selenium, So write App.js like this.
import React…

Teo-Hwang
- 45
- 5
3
votes
1 answer
Is it possible to use experimental version of React while using Create React App
I would like to test React concurrent mode, and still using create-react-app?
Is it possible?
I have check create-react-app documentation, and also looks for a specified NPM module, and didn't found.

Aminadav Glickshtein
- 23,232
- 12
- 77
- 117
3
votes
2 answers
Why am I getting this Error: "Cannot find file './App' in './src'.":?
I am trying to deploy my react app to aws-amplify but I keep getting this error in the build process in aws.
When I run the app in production, "yarn run build" it runs fine locally, but when I push my changes to aws I get the following…

Jessica Delcy
- 31
- 5
3
votes
0 answers
Dependency conflict when using create-react-app inside a nodejs project folder
I am working on a web application with reactjs and nodejs. I am trying to use create-react-app to create a React project inside my server project folder. Everything was fine until I installed a package that requires a webpack@4.43.0. react-scripts…

Junhao6503
- 31
- 2
3
votes
1 answer
Running React app on Internet explorer 11 results in stackoverflow
I am trying to run my react app on internet explorer 11.
I am using Create-React-App and did everything the docs say -
Added in index.js
import "react-app-polyfill/ie11";
import "react-app-polyfill/stable";
import "fast-text-encoding/text"; //this…

Atin Singh
- 3,624
- 2
- 18
- 25