-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
Link to the code that reproduces this issue
https://github.com/Zakisb/aimplifyy
To Reproduce
Encountering a server-side error when deploying a Next.js 14 application with next-intl middleware to Vercel. The deployment fails with a 500 status code, specifically citing EDGE_FUNCTION_INVOCATION_FAILED as the reason. Additionally, a ReferenceError: __dirname is not defined occurs within the ua-parser-js module, as well as in the user-agent and middleware files of next-intl. This error is not present during local development and only manifests upon deployment to Vercel.
Note that previously i worked with next-intl and deployed without a problem. i don't know if it's something to do with the latest next 14 version or next-intl
Current vs. Expected behavior
I expected the web app to be deployed. Currently it's crashing


Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103
Binaries:
Node: 18.18.0
npm: 9.8.1
Yarn: 1.22.11
pnpm: N/A
Relevant Packages:
next: 14.0.1
eslint-config-next: 14.0.0
react: 18.2.0
react-dom: 18.2.0
typescript: 5.2.2
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
Middleware / Edge (API routes, runtime)
Additional context
Works fine locally.