[Bug]: module is not valid utf8
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.
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
- Fork my repo: https://github.com/paulmfischer/fear-of-the-undefined
- Setup a new site in deno deploy to point to fork
- Kick off the
Publish on Deno Deployaction
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
Got the same error
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.
+1, got same error.
Error: The deployment failed: content of 'file:///src/.next/server/app/favicon.ico.body' module is not valid utf8