-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQLError: adapter is not a function Next.js getInitialProps #4311
Comments
Doing more stack tracing, this seems to be an axios issue. I have put a discussion in there. I will close this if an axios fix can correct the issue |
Hey @ryanmalesic, is there an issue open to track the axios discussion? |
|
Any updates? I ran into this issue too |
Is the change in 1.2.4 already? I ran into the same issue while using 1.2.4 today. |
Still having this issue with |
Getting the same error with Next.js and From axios/axios#2507 (comment), this looks to be an Not seeing a workaround. Spent the day getting a Next.js project up only to hit this issue. 🙃 CC @jordanranz |
I got rid of the error using what I needed from. #4305 (comment) |
@simpleshadow, thanks for the tip, I got it working by locking down the versions with resolutions as well. |
Getting the same error with a Nuxt.js application after trying to upgrade aws-amplify to the latest (^2.2.1) Please Amplify-JS team, show a little more love for SSR frameworks, they shouldn't be treated like afterthoughts. |
Forgot to mention that I get this error with express.js. it's not related to a specific ssr framework. |
I think I know the root cause. NuxtJs/NextJs are consuming the amplify library using the I'll look into changing the main field to point to a cjs modules entry point. Anyone knows if there is a way for Nuxt/NextJs apps to read the modules field in library's package.json instead of main? |
…instead of webpack bundles
@ryanmalesic @weizliu @aliankarali @lambda0xff @simpleshadow We have just merged in the fix. Can you please try with aws-amplify@unstable version and let us know if it's fixing the issue? |
Seems to fix the issue for me. |
Yes, it seems like it resolved the issue @Amplifiyer . |
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 |
…instead of webpack bundles (aws-amplify#4678)
Describe the bug
GraphQLError: adapter is not a function
at APIClass. (/Users/ryanmalesic/Projects/tdee-online/node_modules/@aws-amplify/api/dist/aws-amplify-api.js:5565:24)
at step (/Users/ryanmalesic/Projects/tdee-online/node_modules/@aws-amplify/api/dist/aws-amplify-api.js:4733:19)
at Object.throw (/Users/ryanmalesic/Projects/tdee-online/node_modules/@aws-amplify/api/dist/aws-amplify-api.js:4663:14)
at rejected (/Users/ryanmalesic/Projects/tdee-online/node_modules/@aws-amplify/api/dist/aws-amplify-api.js:4625:32)
at runMicrotasks ()
at processTicksAndRejections (interna
To Reproduce
Steps to reproduce the behavior:
Query in getinitialProps of a nextjs app
Expected behavior
It should query, not throw
The text was updated successfully, but these errors were encountered: