Closed sunjae-kim closed 4 years ago
Using node version 12.14.0
From the screenshot it appears you are using a browser though 🙂
Did you webpack your code?
Yes I webpacked my code and opened it with browser.
Then I will need your webpack config, because webpack is supposed to inject setImmediate
.
Thank you Ruben!
I found that setImmediate
was set to false in my webpack setting.
Just added below code in next.config.js
, it worked like a charm 😀
webpack(config, options) {
config.node.setImmediate = true;
...
}
Super!
Hi, I am using Next.js due to SSR.
Using node version 12.14.0 and below is my code.
Sometimes it works, but the most of the time it gives
ReferenceError: setImmediate is not defined
.Is there any solution for this?