denoland / denoland/deploy_feedback

[Bug]: module is not valid utf8

Open
#837 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

### 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](https://github.com/user-attachments/assets/80427370-63ef-494c-a1ea-b1cc8e5eddc9)

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_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the deployment error for highlight.js's brown-papersq.png and compare the referenced GitHub Actions workflow with the Deno Deploy setup. Reproduce using the linked repository and determine whether the asset handling or deployment configuration causes the UTF-8 rejection; done means the site deploys without this error or the cause is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, github-actions, javascript
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.