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

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

Closed
1 task
SapphicMoe opened this issue Mar 12, 2023 · 2 comments
Labels
feat: assets Related to the Assets feature (scope)

Comments

@SapphicMoe
Copy link
Contributor

SapphicMoe commented Mar 12, 2023

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 just yarn.lock):

Code_MgKic2lHLs

I decided to install image-size and include it to my package.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.

msedge_KbuVK5M3uY

It says that Vercel still requires the dependency, even after it is included in the package.json file.
msedge_oJygakxzvj

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

  • I am willing to submit a pull request for this issue.
@SapphicMoe SapphicMoe changed the title Build issue with "image-size" Build issue with "image-size" with Vercel SSR Mar 12, 2023
@SapphicMoe SapphicMoe changed the title Build issue with "image-size" with Vercel SSR Build issue with the "image-size" dependency in Vercel SSR Mar 12, 2023
@SapphicMoe SapphicMoe changed the title Build issue with the "image-size" dependency in Vercel SSR 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..?) Mar 12, 2023
@mfrachet
Copy link
Contributor

Probably related to #6470 which seems to be fixed and closed 😊 . Waiting for a release 🚀

@Princesseuh Princesseuh added the feat: assets Related to the Assets feature (scope) label Mar 13, 2023
@Princesseuh
Copy link
Member

Closing as a duplicate of #6470, seems to be exact same issue! image-size is a capricious package unfortunately 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: assets Related to the Assets feature (scope)
Projects
None yet
Development

No branches or pull requests

3 participants