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
+42-29Lines changed: 42 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,7 +170,7 @@ This is a known problem when using the `jsdom` library (a dependency of Jest) wi
170
170
171
171
### Next 13.4+: React Server Components
172
172
173
-
Next.js 13.4+ introduces [app directory](https://nextjs.org/docs/app/building-your-application/routing#the-app-directory) with the usage of [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components). To use Amplify UI componenents, you must use them inside the Client Component tree by placing `"use client"` at the boundary between your Client and Server component module graph. Please see the Next.js [documentation](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#using-third-party-packages-and-providers) on how you could achieve this.
173
+
Next.js 13.4+ introduces [app directory](https://nextjs.org/docs/app/building-your-application/routing#the-app-directory) with the usage of [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components). Amplify UI components are intended to be used on the client side. See [here](#attempted-import-error-useform-is-not-exported-from-react-hook-form-imported-as-useform) for solutions.
174
174
175
175
### Next 13.4+: `Module not found` Errors
176
176
@@ -186,6 +186,47 @@ Module not found: Can't resolve 'aws-crt' in 'xxx'
186
186
187
187
These errors will not affect the use and functionality of the client, nor will errors appear in the browser console. This is a known transitive issue when using the AWS SDK. The issue is currently tracked [here](https://github.com/aws-amplify/amplify-js/issues/11030).
188
188
189
+
## Server-Side Rendering (SSR)
190
+
191
+
### Attempted import error: 'useForm' is not exported from 'react-hook-form' (imported as 'useForm').
192
+
193
+
If you attempt to use Amplify with server-side rendering, you may encounter the following error:
Attempted import error: 'useForm' is not exported from 'react-hook-form' (imported as 'useForm').
198
+
```
199
+
200
+
Amplify UI components are interactive and designed to work on the client side. To use them inside of Server Components you must wrap them in a Client Component with "use client". For more information, see the Next.js [documentation](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#using-third-party-packages-and-providers) on how you could achieve this.
201
+
202
+
## Vite
203
+
204
+
### `Uncaught ReferenceError: global is not defined`
205
+
206
+
<Message
207
+
variation="filled"
208
+
colorTheme="info"
209
+
>
210
+
Note: this issue was fixed in `aws-amplify` version 6
211
+
</Message>
212
+
213
+
When working with a [Vite](https://vitejs.dev) project you must make a few modifications. Please follow the steps below.
> If you are still having issues, please see comments on the following issue for additional [Vite workarounds](https://github.com/aws-amplify/amplify-js/issues/9639). Note that there is active ongoing work to make these modifications unnecessary.
229
+
189
230
## Webpack
190
231
191
232
### Webpack 5+: `Uncaught ReferenceError: process is not defined`
@@ -229,31 +270,3 @@ Follow the instructions below if you are using Webpack 5:
229
270
230
271
Follow [here](#cra-4-cant-import-the-named-export-amplify-from-non-ecmascript-module-only-default-export-is-available) for solutions.
231
272
232
-
233
-
## Vite
234
-
235
-
### `Uncaught ReferenceError: global is not defined`
236
-
237
-
<Message
238
-
variation="filled"
239
-
colorTheme="info"
240
-
>
241
-
Note: this issue was fixed in `aws-amplify` version 6
242
-
</Message>
243
-
244
-
When working with a [Vite](https://vitejs.dev) project you must make a few modifications. Please follow the steps below.
> If you are still having issues, please see comments on the following issue for additional [Vite workarounds](https://github.com/aws-amplify/amplify-js/issues/9639). Note that there is active ongoing work to make these modifications unnecessary.
0 commit comments