You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/pages/[platform]/getting-started/troubleshooting/troubleshooting.react.mdx
-55Lines changed: 0 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,60 +89,6 @@ export default defineConfig({
89
89
...
90
90
```
91
91
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
-
146
92
## Jest
147
93
148
94
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
154
100
Please follow the steps below to resolve this issue.
155
101
156
102
**1.** Navigate to or create a [Jest setup file](https://jestjs.io/docs/configuration#setupfilesafterenv-array) for your project.
157
-
158
103
**2.**Addthefollowingcodetopolyfilltheunrecognizedfunction in your Jest setup file:
0 commit comments