Next.js Discord

Discord Forum

runtime = 'edge' causes 'ReferenceError: self is not defined' error

Unanswered
Mnigos posted this in #help-forum
Open in Discord

2 Replies

Avatar
export default function ProfilePage() {
  return <>e</>
}


It works without defining runtime, but with runtime = 'edge' it causes error:
 ⨯ ReferenceError: self is not defined
 


Everything works on development server and vercel deployment. The issue occurs when starting locally production build.

next@14.2.15
Avatar
bump