Vercel's Serverless Function crashes due to not being able to find the "image-size" module (and is also required for astro build for some reason..?) #6521
Labels
feat: assets
Related to the Assets feature (scope)
What version of
astro
are you using?2.1.2
Are you using an SSR adapter? If so, which one?
I'm using the Vercel SSR adapter.
What package manager are you using?
yarn (version 3.3.1)
What operating system are you using?
I'm using Ubuntu under WSL (Windows Subsystem for Linux) in this case.
What browser are you using?
Microsoft Edge
Describe the Bug
With the release of Astro 2.1(?), I have been getting an error when building my website with the
image-size
dependency, even though my workspace doesn't require it (as can be seen below, it's justyarn.lock
):I decided to install
image-size
and include it to mypackage.json
file, and sure enough,astro build
worked locally.However when I go and deploy my site to Vercel, it says that a serverless function has crashed.
It says that Vercel still requires the dependency, even after it is included in the

package.json
file.Any help is appreciated. Thank you!
Link to Minimal Reproducible Example
None. I don't think I can use Stackblitz to reproduce this issue, since it is related to Vercel.
Participation
The text was updated successfully, but these errors were encountered: