deploy_feedback icon indicating copy to clipboard operation
deploy_feedback copied to clipboard

[Bug]: NextJS deployment failure because of woff2

Open whcherng opened this issue 10 months ago • 4 comments

Problem description

Image

Steps to reproduce

  1. deployctl deploy --include=.next --include=public jsr:@deno/nextjs-start/v15
  2. deployment failed after all assets is uploaded.
  3. error message "error: The deployment failed: content of 'file:///src/.next/static/media/569ce4b8f30dc480-s.p.woff2' module is not valid utf8" is shown

Expected behavior

Tried to deploy NextJS built file but failed.

Environment

deno v2.2.2 NextJS 15

Possible solution

No response

Additional context

No response

whcherng avatar Feb 28 '25 19:02 whcherng

I have it the same, any progress on this?

mniami avatar Mar 23 '25 17:03 mniami

In my case, I only needed to delete next/font and the favicon, and it worked. This issue likely occurs because optimization is not yet supported in Deno deployment.

you can check my repo: https://github.com/zalwan/rzs-landing

zalwan avatar Mar 29 '25 13:03 zalwan

I have the same problem my .next folder is in my .gitignore though so like yours it doesn't appear in my repository on github. Do I just delete this from my local dev branch then remove .next from my .gitignore so it pushed once and then try again?

Sc1entifik avatar Apr 04 '25 20:04 Sc1entifik

Removed the font but got another similar error:

Error: The deployment failed: content of 'file:///src/.next/cache/webpack/server-production/0.pack' module is not valid utf8

lesichkovm avatar May 11 '25 16:05 lesichkovm