deploy_feedback icon indicating copy to clipboard operation
deploy_feedback copied to clipboard

[Bug]: module is not valid utf8

Open paulmfischer opened this issue 9 months ago • 3 comments

Problem description

Getting the following error when deploying my code base in Deno Deploy:

{"type":"error","code":"deploymentFailed","ctx":"The deployment failed: content of 'file:///src/_vendor/npm/registry.npmjs.org/highlight.js/11.11.1/styles/brown-papersq.png' module is not valid utf8"}

The repo I am deploying from: https://github.com/paulmfischer/fear-of-the-undefined It looks like it doesn't like a file inside highlight.js package that is pulled in from Lume that I am using. This deployment worked a month ago without this issue when I last made some changes.

Image

As far as I can tell, that file (brown-papersq.png) has been in the highlight.js repo for like 10 years and has not changed recently. So I updated my Lume site and my main.yml deno deploy script just to make sure it wasn't some issue with code versions on my end but the error still persists. The error appears in Deno Deploy and not in Github Actions during the deployment process. I do get a TypeError: terminated in my Github Actions (https://github.com/paulmfischer/fear-of-the-undefined/actions/runs/14068559853) a lot when deploying but the deployment still appears in Deno afterward, not sure this is related.

Is this something in my repo I don't have setup/configured correctly? Like my github action deploy or another setting in my project?

Steps to reproduce

Best steps I can think of would be to

  1. Fork my repo: https://github.com/paulmfischer/fear-of-the-undefined
  2. Setup a new site in deno deploy to point to fork
  3. Kick off the Publish on Deno Deploy action

Expected behavior

Code is deployed to my site in Deno Deploy.

Environment

  • Deno version 2.1.7 locally (2.x on Github/DenoDeploy)

Possible solution

No response

Additional context

No response

paulmfischer avatar Mar 25 '25 20:03 paulmfischer

Got the same error

zengbo avatar Apr 03 '25 01:04 zengbo

It appears this issue has been brought up in a few other bugs https://github.com/denoland/deploy_feedback/issues/830 https://github.com/denoland/deploy_feedback/issues/823 but no fix for them really other than removing the offending file or not deploying it. The error I get comes from a dependency so I cannot really remove the file and it comes in when the dependency is downloaded so I cannot really do anything about that either. Unless of course I completely remove that dependency which I really don't want to do.

paulmfischer avatar Apr 07 '25 20:04 paulmfischer

+1, got same error.

Error: The deployment failed: content of 'file:///src/.next/server/app/favicon.ico.body' module is not valid utf8

Lqm1 avatar Apr 16 '25 10:04 Lqm1