-
Notifications
You must be signed in to change notification settings - Fork 27k
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
"Segmentation fault" on Vercel (when using Plaiceholder/Sharp) #23531
Comments
Just tested with |
I had a similar issue building via Docker when next/image elements are included in static files, when using next past version 10.0.5 and Dockerfiles based on Using the newest version of Docker Likely either vercel is using one of these Docker images or missing the same thing the images are. Not 100% certain exactly what that is - according to this nodejs/docker-node#1158 it looks security config related? Edit: Re-reading and realizing Next removed Sharp, it seems like my segfault is not likely to be 100% related to yours. I am using sharp in some API routes, but those aren't being called on build. Odd. |
I found that deploying on Vercel today fails due to an |
Hey! I took a look at your repro (thank you for including that!) and this issue actually does consistently reproduce when running Best guess is that this is an issue with a recent release of
I'm going to close this issue for now, but please re-open if there's reason to believe this is caused by Next. |
Hey @divmain, thanks for digging into this and giving a detailed response! This kind of stuff is out of my area of expertise to be honest, so I've flagged up the issue with |
Update 🎉 // next.config.js
require('sharp');
module.exports = {}; However, is this the recommended approach for adding |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
10.1.1
What version of Node.js are you using?
14.16.0
What browser are you using?
N/A
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
When using Plaiceholder (or Sharp-based) inside
getStaticProps
, the build succeeds locally, but fails on Vercel with the following error:Expected Behavior
Although Sharp has been removed from the Next.js dependencies, I would expect to be able to install it manually and use within
getStaticProps
To Reproduce
Reproduction Project
GitHub: https://github.com/joe-bell/issue-repro-nextjs-plaiceholder
Vercel: https://vercel.com/joebell/issue-repro-nextjs-plaiceholder
To help debug this I've showcased 4 different strategies to create placeholders:
ts-node
ts-node
getStaticProps
getStaticProps
All strategies run successfully locally
Pre-build strategies run successfully on Vercel, but
getStaticProps
do not.Running Locally
To build locally, run
npm run build
Related Issues / Discussions
https://github.com/joe-bell/plaiceholder/issues/60
#23189
#20915 (comment)
Additional Context
Previously contacted Vercel support via @mcsdevv, but I understand it would be more helpful to provide a more detailed repoduction
The text was updated successfully, but these errors were encountered: