-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
RTKQ: Nextjs getServerSideProps #1240
Comments
You might want to follow #1277 where I'm building SSR support. For me, I solved this specific problem by doing const { default: AbortController } = require("abort-controller");
const { default: fetch, Headers, Request, Response } = require("node-fetch");
Object.assign(globalThis, {
fetch,
Headers,
Request,
Response,
AbortController,
}); in |
Available in the 1.7 betas. (Either that or the workaround solves the |
Wait does 1.7 beta-1 fix this? I am deploying on Vercel running Node 14.x and still get this issue despite being on 1.7 beta-1. I also tried adding
to my _app.tsx file but when testing locally on my M1 MacBook running Node 16.x I get this error
|
^ It also won't compile on vercel either when I try to do the _app trick |
@agusterodin that is not something we have any control over unfortunately. You'll have to dig into your environment, the fetch polyfills you use and when they are loaded (the sooner the better). |
Gotcha, thanks! For anybody else encountering this I will leave this link here: https://github.com/vercel/vercel/discussions/7003 Node 16 on Vercel seems like it is around the corner. |
I only had this problem when using jest, I ended up doing this under node 14.x within my
|
Hello,
As mentioned by @gfortaine here we can avoid the error
Expected signal to be an instanceof AbortSignal
by using Node 15.The problem being that Vercel's Node version is 14.x
Is there any workaround until Vercel offers more recent Node versions?
The text was updated successfully, but these errors were encountered: