Skip to content
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

Unable to use in a nextjs application #3

Open
0xFlicker opened this issue Aug 6, 2024 · 2 comments
Open

Unable to use in a nextjs application #3

0xFlicker opened this issue Aug 6, 2024 · 2 comments

Comments

@0xFlicker
Copy link

See https://github.com/0xFlicker/airstack-next-bug-repro for a reproducible case

yarn dev is fine, but yarn build will throw an error with a lot of text output, mainly because it includes some minified source code.

the example above is the quick start nextjs example with this library included

the build error can be fixed by commenting out the init function from this library

@YosephKS
Copy link
Collaborator

YosephKS commented Aug 6, 2024

Hi @0xFlicker thanks

will check further later on

but briefly looking, looks like you're using it in a client environment instead of server-side, like under /app/api for nextjs, which is not something intended for the SDK as the SDK is purposely built for the Frames.

If you're looking for a client solution for using Airstack, recommend that you check out Airstack web SDK

@0xFlicker
Copy link
Author

it's in the app router, which runs server side and the same thing will happen in api route, e.g. https://github.com/0xFlicker/airstack-next-bug-repro/blob/main/src/app/frame/route.ts produces the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants