-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Vercel Sharp #9592
Comments
Hello @ohrrkan. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Hello. I had the same problem. I solved it by first updating Node to version 20.10. I was working with version 18. Then I updated Astro and the dependencies. And finally I manually installed Sharp with npm (Not with pnpm), and it worked. Here is a simple project with the solution applied: https://github.com/domingouribe/news-card.git |
Thanks @domingouribe but it do not solved the issue with Vercel. No issue with a vanilla node build but with Vercel integration, sharp will not work. here is the example base on your example (https://github.com/ohrrkan/test-astro) with the add of Vercel. You can see the difference between "npm run build" : KO (this is with Vercel adapter) "npm run build:node" : OK (with node adapter) Upload on Vercel server this will lead to this kind of error but as you can see sharp module is install.
|
ok I find one of the reason. I was not using
as the warning (info) end with : "This may not be a problem, but it's worth checking." I will close the issue |
at the end it is a duplicate of #9345 and my solving :
is more a bypass than a real solution of the original issue => it use the Vercel service in place of the sharp astro one. for now I solved it by getting back to sharp "^0.32" |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
built-in
<Image />
are no more correctly generated by sharp when build with Vercel integration.installing sharp module do not solve it.
astro build give this new compilation warning :
[@astrojs/vercel] The module "@img/sharp-wasm32/versions" inside the file "/node_modules/sharp/lib/utility.js" couldn't be resolved. This may not be a problem, but it's worth checking.
[@astrojs/vercel] The module "@img/sharp-libvips-/package" inside the file "/node_modules/sharp/lib/sharp.js" couldn't be resolved. This may not be a problem, but it's worth checking.
[@astrojs/vercel] The module "@img/sharp-libvips-dev/include" inside the file "/node_modules/sharp/lib/libvips.js" couldn't be resolved. This may not be a problem, but it's worth checking.
[@astrojs/vercel] The module "@img/sharp-libvips-dev/cplusplus" inside the file "/node_modules/sharp/lib/libvips.js" couldn't be resolved. This may not be a problem, but it's worth checking.
What's the expected result?
Why
<Image />
do not work anymore with VercelLink to Minimal Reproducible Example
vercel
Participation
The text was updated successfully, but these errors were encountered: