Skip to content

Commit d29159a

Browse files
authored
Revert "Add docs for cra4 troubleshooting (#1919)" (#1985)
1 parent c62f85d commit d29159a

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

docs/src/pages/[platform]/getting-started/troubleshooting/troubleshooting.react.mdx

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -89,60 +89,6 @@ export default defineConfig({
8989
...
9090
```
9191
92-
## Create React App
93-
94-
Versions of [Create React App](https://create-react-app.dev/) prior to v5 may not include necessary plugins to transpile ES2020 features. This may result in an `Unexpected token` error:
95-
96-
```bash
97-
Module parse failed: Unexpected token
98-
File was processed with these loaders:
99-
* ./node_modules/babel-loader/lib/index.js
100-
You may need an additional loader to handle the result of these loaders.
101-
```
102-
103-
The best solution to this error is to upgrade the version of Create React App to v5 where ES2020 features are transpiled correctly:
104-
105-
```shell
106-
npm install --save react-scripts@5
107-
```
108-
109-
If you are unable to upgrade your `react-scripts` version, try making your browser target list less aggressive by doing the following:
110-
111-
**1.** Remove the `.cache` directory from your project's `node_modules`:
112-
113-
```shell
114-
rm -rf node_modules/.cache
115-
```
116-
117-
**2.** Change the `browserslist` block in your `package.json` from:
118-
119-
```json
120-
"browserslist": {
121-
"production": [
122-
">0.2%",
123-
"not dead",
124-
"not op_mini all"
125-
],
126-
"development": [
127-
"last 1 chrome version",
128-
"last 1 firefox version",
129-
"last 1 safari version"
130-
]
131-
}
132-
```
133-
134-
to the following:
135-
136-
```json
137-
"browserslist": [
138-
">0.2%",
139-
"not dead",
140-
"not op_mini all"
141-
]
142-
```
143-
144-
**3.** Try rebuilding and starting your project.
145-
14692
## Jest
14793
14894
As of v2.15.0 of `@aws-amplify/ui-react` which included the release of Geo components, users of the Jest testing framework may run into the following error when attempting to run tests:
@@ -154,7 +100,6 @@ window.URL.createObjectURL is not a function
154100
Please follow the steps below to resolve this issue.
155101

156102
**1.** Navigate to or create a [Jest setup file](https://jestjs.io/docs/configuration#setupfilesafterenv-array) for your project.
157-
158103
**2.** Add the following code to polyfill the unrecognized function in your Jest setup file:
159104

160105
```js

0 commit comments

Comments
 (0)