You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I want to ask you for advice - I can't find anywhere in the code an implemented function setImmediate or something similar. Yet I'm getting this error.
I have a Next.js application that runs on Cloudflare Pages and when I want to use SSR and getServerSideProps, I am forced to use the edge runtime.
So I open a page, for example pages/index.tsx (using pages, not App router) and add rows:
exportconstconfig={runtime: 'experimental-edge',}
I start the server, open the index page and get an error:
✓ Compiled / in 15.2s (4039 modules)
"transform" style array value is deprecated. Use space-separated string functions, e.g., "scaleX(2) rotateX(15deg)".
⨯ Error: A Node.js API is used (setImmediate) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
at <unknown> (file:///Users/myuser/Developer/myproject/node_modules/next/dist/server/web/sandbox/context.js:82)
at throwUnsupportedAPIError (file:///Users/myuser/Developer/myproject/node_modules/next/dist/server/web/sandbox/context.js:79:19)
at <unknown> (file:///Users/myuser/Developer/myproject/node_modules/next/dist/server/web/sandbox/context.js:113:17)
at scheduleOnUI (webpack://_N_E/node_modules/react-native-reanimated/lib/module/reanimated2/js-reanimated/JSReanimated.js?e8a4:90:5)
at undefined (webpack://_N_E/node_modules/react-native-reanimated/lib/module/reanimated2/threads.js?3cce:129:5)
at eval (webpack://_N_E/node_modules/react-native-reanimated/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js?7220:165:1)
at ../../node_modules/react-native-reanimated/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js (file:///Users/myuser/Developer/myproject/apps/next/.next/server/pages/index.js:10222:1)
```bashat __webpack_require__ (file:///Users/myuser/Developer/myproject/apps/next/.next/server/edge-runtime-webpack.js:37:33)at fn (file:///Users/myuser/Developer/myproject/apps/next/.next/server/edge-runtime-webpack.js:310:21)at eval (webpack-internal:///../../node_modules/react-native-reanimated/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js:9:84)at ../../node_modules/react-native-reanimated/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js (file:///Users/myuser/Developer/myproject/apps/next/.next/server/pages/index.js:10233:1)at __webpack_require__ (file:///Users/myuser/Developer/myproject/apps/next/.next/server/edge-runtime-webpack.js:37:33)at fn (file:///Users/myuser/Developer/myproject/apps/next/.next/server/edge-runtime-webpack.js:310:21)at eval (webpack-internal:///../../node_modules/react-native-reanimated/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js:2:75)at ../../node_modules/react-native-reanimated/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js (file:///Users/myuser/Developer/myproject/apps/next/.next/server/pages/index.js:10244:1)at __webpack_require__ (file:///Users/myuser/Developer/myproject/apps/next/.next/server/edge-runtime-webpack.js:37:33)
Similar error with a clean project:
- event compiled client and server successfully in 6.1s (2745 modules)
- error ../node_modules/react-native-reanimated/lib/module/reanimated2/js-reanimated/JSReanimated.js (22:0) @ JSReanimated.scheduleOnUI
- error A Node.js API is used (setImmediate) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
null
- wait compiling /_error (client and server)...
I tried adding lines to the top of the _app.tsx file:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I want to ask you for advice - I can't find anywhere in the code an implemented function setImmediate or something similar. Yet I'm getting this error.
I have a Next.js application that runs on Cloudflare Pages and when I want to use SSR and
getServerSideProps
, I am forced to use the edge runtime.So I open a page, for example
pages/index.tsx
(using pages, not App router) and add rows:I start the server, open the index page and get an error:
Similar error with a clean project:
I tried adding lines to the top of the _app.tsx file:
I tried manually changing the library, but I couldn't figure out exactly where the error was coming from, even by stacktrace.
Even polyfill (known to me) didn't help.
I will be glad for any advice. Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions