Closed sanserna closed 1 year ago
I see something similar
[@astrojs/vercel] The module "sharp" inside the file "/Users/jacoblamb/GitHub/jtlamb.dev/dist/chunks/sharp.7e5222ad.mjs" couldn't be resolved. This may not be a problem, but it's worth checking.
I had the same issue while building and deploying. There seems to be some weird issue with the dependency management.
You can just fix the problem by manually installing sharp
npm install sharp@latest
I am experiencing the same issue building with the latest version of Astro. I attempted to follow @newtoallofthis123 's instructions and added sharp@latest to my dependencies within the package.json
and received the same error.
"dependencies": {
"@astrojs/prefetch": "latest",
"astro": "latest",
"wrangler": "latest",
"sharp": "latest"
},
My Specs:
Astro version v3.0.3
Package manager bun
Platform darwin
Architecture aarch64
Adapter N/A (none)
Integrations N/A (none).
This issue is also observable in the astro bun template located in the documentation:
bunx create-astro@latest my-astro-project-using-bun --template eliancodes/brutal
if you migrate to the latest version of astro.
Astro ^2.10.3 does not encounter this issue (as long as you enable the formerly experimental assets feature in the config).
As mentioned on the page of the error, strict package managers like pnpm require a manual install.
I'm not sure for Bun however, we don't support it officially so I've never investigated how it works (and it could very well be an issue upstream for them)
I see something similar
[@astrojs/vercel] The module "sharp" inside the file "/Users/jacoblamb/GitHub/jtlamb.dev/dist/chunks/sharp.7e5222ad.mjs" couldn't be resolved. This may not be a problem, but it's worth checking.
This one is normal, sharp
is external on Vercel. It should still work! Though the hint message is admittedly threatening
It works for me for some unknown reason.... I am just using npm
It works for me for some unknown reason.... I am just using
npm
its just for pnpm users that see this error
I'm not sure if there's anything we can do here, but we'll need to discuss whether this is something we can fix.
@sanserna This should be fixed in the latest version.
We fixed the warning showing on Vercel build and added note in some places in docs about this:
During the beta we tried to find a way to fix this for pnpm
users but couldn't find anything. Other projects that use Sharp in a similar fashion are also affected by this issue.
I'll close the issue since there's nothing actionable at this time.
I had the same issue while building and deploying. There seems to be some weird issue with the dependency management.
You can just fix the problem by manually installing
sharp
npm install sharp@latest
Sadly for me it stopped working :(, did not change anything just added mdx
I can confirm that this happens with older versions of nodejs. I upgraded from node19 to node22 and now its working with pnpm
Astro info
What browser are you using?
Chrome
Describe the Bug
After upgrading Astro from
v2.10.9
tov3.0.3
the build command is throwing the below errorThe documentation mentions Astro v3.0 includes Sharp as the default image processing service, do I need to install the dependency manually?
What's the expected result?
The build ends successfully.
Link to Minimal Reproducible Example
NA
Participation