Encountering Issues with Next.js, Wrangler, and OpenNext Integration ([ERROR] Could not resolve "XX"
Hi everyone,
I'm encountering an issue while trying to run a Next.js project on Cloudflare Workers. Here's my setup:
Next.js: 14.2.5
Wrangler: 3.83.0
OpenNext: 0.2.1
The build step runs successfully:
Success: Build command completed
However, when I run the development server with wrangler dev --port 8771, I get the following errors:
[ERROR] Could not resolve "uuid"
[ERROR] Could not resolve "jose"
It seems like there are missing dependencies or something's off during the resolution process.
I've tried reinstalling packages and rebuilding, but the issue persists.
Question:
How can I resolve these dependency issues, and is there any recommended way to ensure compatibility between these versions for Cloudflare Workers?
Thanks for any advice! 🙏
1 Reply
edit:
I had use firebase auth to verify token in nextjs api