Build Error with experimental-edge runtime in Next.js 13.4 page router: TypeError: Cannot read properties of undefined (reading 'slice') #70294
Unanswered
Jainik-1743
asked this question in
Help
Replies: 1 comment
-
Faced similar issue when rendering on edge. Just removed edge and stick with NodeJS for renderer and hosted on vps |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I'm using Next.js version 13.4 on Debian Linux with Node.js v21.5.0. I attempted to use the edge runtime for server-side rendering on a page (/about), and initially received an error recommending to switch to 'experimental-edge'. After switching to 'experimental-edge', a new error occurred during the build process:
I expect the page /about to be successfully compiled and built when using the 'experimental-edge' runtime, without encountering any runtime or build errors.
To Reproduce
Install Next.js version 13.4 on Debian Linux with Node.js v21.5.0.
Set the runtime to 'experimental-edge' for a page, e.g. /about.js:
export const runtime = 'experimental-edge';
Run yarn build.
Environment
Operating System: Debian Linux
Node.js Version: 21.5.0
Next.js Version: 13.4
React Version: 18.2.0
Additional Context
The warning DeprecationWarning: The 'punycode' module is deprecated appears multiple times during the build process.
The error seems to occur after collecting page data, specifically when processing /about.js.
I'm using the following Next.js configuration in next.config.mjs:
export default withBundleAnalyzerConfig(nextTranslate(nextConfig));
Any guidance or workarounds for resolving this error would be appreciated.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions