[wrangler:error] Error: no such file or directory at Object.chdir (node-internal:public_process:60:17) at setNextjsServerWorkingDirectory (.open-next/server-functions/default/handler.mjs:...) at .open-next/server-functions/default/handler.mjs:... at null.<anonymous> (.open-next/worker.js:47:39)
[wrangler:error] Error: no such file or directory at Object.chdir (node-internal:public_process:60:17) at setNextjsServerWorkingDirectory (.open-next/server-functions/default/handler.mjs:...) at .open-next/server-functions/default/handler.mjs:... at null.<anonymous> (.open-next/worker.js:47:39)
What I checked: -
.open-next/server-functions/default/
.open-next/server-functions/default/
exists and contains
handler.mjs,
handler.mjs,
, .next/, etc. - Running from project root. Tried cleaning .open-next and rebuilding but got same error.
Question: - Is this a known issue with OpenNext on Wrangler preview? - Why would
setNextjsServerWorkingDirectory
setNextjsServerWorkingDirectory
fail even though the folder and files exist?
Any workaround to make the local server run successfully ?