Skip to content

Build fails on vercel however succeds on local #44

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

Closed
AkashRajpurohit opened this issue Nov 13, 2021 · 12 comments
Closed

Build fails on vercel however succeds on local #44

AkashRajpurohit opened this issue Nov 13, 2021 · 12 comments

Comments

@AkashRajpurohit
Copy link
Contributor

Running yarn build locally works fine, however on vercel the build fails with error

image

I feel this might be similar to the issue mentioned here #41 as it seems the build fails when type checking is done on vercel during compilation step.

@ipatate
Copy link

ipatate commented Nov 13, 2021

same problem

@lucas-homer
Copy link

same problem here too

@schickling
Copy link
Collaborator

I'll try to look into this soon. Just to confirm:

  1. This doesn't happen locally even when having deleted .next and node_modules/.contentlayer before?
  2. This happens consistently on every (re)build on Vercel?

@ipatate
Copy link

ipatate commented Nov 14, 2021

yes, after deleted node_modules/.contentlayer, i have the same problem. It's strange, because i found a folder .contentlayer to the root on my project with an index export {} inside. I deleted this folder and now it's work localy. I push for deploy and bim, same error. 🧐

@schickling
Copy link
Collaborator

As a temporary workaround you can call yarn contentlayer build before next build in your CI step

@ipatate
Copy link

ipatate commented Nov 15, 2021

i tried before your message, same error. The documents are generated before build, it's not the problem apparently

@schickling
Copy link
Collaborator

schickling commented Nov 15, 2021

@ipatate @lucas-homer @AkashRajpurohit can you please provide your Yarn/NPM and Node version?

@schickling
Copy link
Collaborator

I've released a new dev version (hopefully) containing a fix. Please get it a try so I cut a stable release for everyone. 🤞

yarn add contentlayer@dev next-contentlayer@dev

@ipatate
Copy link

ipatate commented Nov 15, 2021

ok for me with dev version. Work on vercel now

@schickling
Copy link
Collaborator

Should be fixed now: https://github.com/contentlayerdev/contentlayer/releases/tag/v0.0.32

@dgknca
Copy link

dgknca commented Jul 2, 2023

@schickling this is happening again in v0.3.4. (I don't use appDir)

image

@Bodrie
Copy link

Bodrie commented Sep 1, 2023

Yep, same here, its complaining about not existing property, but it is actually there and the local build passes...

265136206-869f0556-d5ca-4c27-86ab-db02628b11d1

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

6 participants