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

Build Fails on Vercel When Adding Post To Content Collection #43

Open
AdamGEmerson opened this issue Mar 20, 2024 · 1 comment
Open

Comments

@AdamGEmerson
Copy link

Describe the bug

Deploying the template on vercel results in failed builds due to in invalid runtime for Vercel Serverless Functions.

To Reproduce

Steps to reproduce the behavior:

  1. Use the "Deploy with Vercel" button to launch the template.
Screenshot 2024-03-20 at 3 58 28 AM
  1. Follow the steps for setup as written in the template
  2. Create a new post.
  3. Commit to github to trigger Vercel redeploy or redeploy manually.
  4. Build fails with error:
Screenshot 2024-03-20 at 4 00 07 AM

Expected behavior

Build should succeed when adding a sample post to the content collection per the template instructions.

Which versions of Sanity are you using?

Run sanity versions in the terminal and copy-paste the result here.

What operating system are you using?

@sanity/cli (global)  3.17.0 (latest: 3.35.0)
@sanity/astro          1.3.0 (latest: 3.0.0)
@sanity/image-url      1.0.2 (up to date)
@sanity/types         3.17.0 (latest: 3.35.0)
@sanity/vision        3.17.0 (latest: 3.35.0)
sanity                3.17.0 (latest: 3.35.0)

Which versions of Node.js / npm are you running?

10.2.4
v18.19.1

** Proposed Solution **

This issue resolved for me by updating the package.json to have a more current version of node in the engines section.

"engines": {
    "node": "18"
  }
@realitydesigners
Copy link

I'm also getting this error but the proposed solution did not fix it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants