Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Could not load the "sharp" module using the linux-x64 runtime #7985

Closed
lleifermann opened this issue Jan 31, 2025 · 1 comment · Fixed by #7988 or #7991
Closed

🐛 BUG: Could not load the "sharp" module using the linux-x64 runtime #7985

lleifermann opened this issue Jan 31, 2025 · 1 comment · Fixed by #7988 or #7991
Labels
bug Something that isn't working regression Break in existing functionality as a result of a recent change

Comments

@lleifermann
Copy link

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions are you using?

3.107.0 [wrangler]

What operating system and version are you using?

Github CI/CD ubuntu-latest

Please provide a link to a minimal reproduction

No response

Describe the Bug

Hey there!

We've just run into an issue with wrangler deployments. With the latest version of wrangler 3.107.0 running wrangler like this:

npx wrangler pages publish dist/ --project-name=xxxxx

Produces this error in our github job:

Error: Could not load the "sharp" module using the linux-x64 runtime

The job is running inside an actions/setup-node@v4 with node-version: '19'

Looking at the release of wrangler 3.107.0 it seems like something about the bundling & hoisting of sharp was changed: #7945

Downgrading wrangler to 3.106.0 fixes the issue.

I am not too familiar what exactly the motivation of the change was, but i think it does make sense that wrangler hoists sharp as a dependency, so downstream installations do not need to worry about installing the correct sharp package for the specific platform.

Please provide any relevant error logs

No response

@lleifermann lleifermann added the bug Something that isn't working label Jan 31, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jan 31, 2025
@edmundhung
Copy link
Member

@lleifermann Thanks for the report! This is indeed a regression. We’re reverting the changes and will release a patch soon.

@penalosa penalosa added the regression Break in existing functionality as a result of a recent change label Jan 31, 2025
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working regression Break in existing functionality as a result of a recent change
Projects
Status: Done
3 participants