-
Notifications
You must be signed in to change notification settings - Fork 67
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
Mistake in docs. Example for Next.js App Router #1148
Comments
It is even worse than that. |
Looks like there were dead links that CI tripped on. I'm trying to fix it, will ping back here when the changes are live. |
Docs should be updated now. @pi-kei could you check if your issue also exists in the updated docs? |
@Skn0tt Issue still exists in the updated docs. export const emailQueue = Queue( This causes an error on
|
Are you also exporting the queue as a named function If you do, whats your currently installed nextjs and quirrel versions? |
@KevinEdry quirrel: 1.14.1 next: 13.4.7 |
@pi-kei can you share your code? also, are you exporting something there as default?, you should be able to export both POST and emailQueue without an issue. Nextjs route handling in the app router looks for 2 things, either an export default, or a named export (i.e POST, GET etc...) this means that in theory, Nextjs can't really know about what else you are exporting from that file because it doesn't know the constant name "emailQueue". |
@KevinEdry |
Interesting, didn't catch that when writing the adapter! Have you tried placing the |
@Skn0tt I placed import { emailQueue } from "@/queues/email";
export { emailQueue as POST }; To enqueue I use this in my import { emailQueue } from "@/queues/email";
export async function notify(...) {
await emailQueue.enqueue(...);
} And it is perfectly working. |
Can someone share a working example with nextjs 13? I get logs on jobs being queued and completed but nothing from my code is executed. |
@Blakeinstein I've had this issue. The problem was in job id. It contained unallowed characters to pass it in http header. Job was marked as complete but no request to nextjs api was made. I fixed it by hashing my job id and formatting it as hex string so it contains only digits and latin letters. |
Bug Report
Current Behavior
There's a mistake in docs in quirrel/docs/docs/getting-started/next-js.mdx
Input Code
Example for App Router (Next.js)
Wrong import at line 92 https://github.com/quirrel-dev/quirrel/blob/v1.14.0/docs/docs/getting-started/next-js.mdx#L92
Expected behavior/code
Must be
Environment
Possible Solution
Just add
route
in import pathThe text was updated successfully, but these errors were encountered: