docs icon indicating copy to clipboard operation
docs copied to clipboard

NextJS Getting Started guide: **Error: No current user**

Open artidataio opened this issue 2 years ago • 1 comments

Describe the bug I'm trying to follow the NextJS Getting Started Guide. However, I'm now stuck at this section, with Error: No current user :

Someone else has reproduced the bug in StackOverflow.

To Reproduce Steps to reproduce the behavior:

Expected behavior Tutorial can go smoothly until deploy and host app.

Screenshots Screenshot 2022-06-09 5 55 06 PM

Desktop (please complete the following information):

  • OS: Linux
  • Browser: chrome

artidataio avatar Jun 09 '22 11:06 artidataio

Hi @artidata , thanks for raising. I have a repo using the new Authenticator UI + Next SSR + getServerSideProps (https://github.com/siegerts/next-amplified/blob/amplify-ui/pages/index.js) that may help to get you unblocked. The linked StackOverflow question is using getStaticPaths and getStaticProps which are invoked during build time so the user will likely not be present since the user is not "logged in" when you run your build process.

siegerts avatar Jun 09 '22 13:06 siegerts

Between updating this tutorial and @artidata's thumbs up, I am considering this issue closed!

rachelnabors avatar Oct 12 '22 07:10 rachelnabors