Closed hello2all closed 5 years ago
+1
This is same as #4243 and has been fixed in unstable release. We will release it soon.
@anarerdene, can you confirm in your node_modules directory, what version of aws-amplify you are using, stable 1.2.3 or 1.2.4-unstable.5
hi @Amplifiyer ,
im using stable 1.2.3 and 1.2.4-unstable.5. But still window not working error.
@hello2all @anarerdene We did do a release yesterday, version 1.2.4
and the Pull request that I referenced resolves this issue. I do want to state that Amplify doesn't officially support SSR at this time. Please add a reaction or a +1 for SSR as this is an open feature request for that. I am going to resolve this issue, please feel free to reopen this issue if were are still experiencing this after installing the latest version released.
Amplify needs SSR. I've been trying to deploy a NextJS app to Amplify and I will probably have to abandon this idea soon enough if it's an impossible concept
@samstr, what issues are you facing while deploying the NextJS app? Can you create another issue with a detailed repro steps?
@Amplifiyer I've tried to do the same, the deploy is successful but when I got to the app it says there is an error and I've been redirected too many times.
Here are my build deets
version: 0.1 frontend: phases: preBuild: commands:
npm run build runs "next build"
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Describe the bug 1.2.3 update causes incompatibility issues with Next.js.
Error output:
ReferenceError: window is not defined
To Reproduce Steps to reproduce the behavior:
Create a new Next.js project
Install aws-amplify
npm install aws-amplify
Import amplify in the newly created project add
import Amplify from 'aws-amplify'
into/pages/index.js
.Start dev server
npm run dev
Expected behavior aws-amplify should be SSR compatible.
Screenshots a complete dump of the error output is provided below:
Desktop (please complete the following information):
Amplify context
Additional context N.A.
Sample code N.A.