-
Notifications
You must be signed in to change notification settings - Fork 60
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
next.js build: building contentlayer prior to TSC or adding more clear docs #105
Comments
Just adding a comment that we've had to do the same thing for our site. We also have to use |
@jzxhuang Where would you expect to see this documentation? Perhaps a mention in the getting started guide and also a note in Known Problems or maybe a separate troubleshooting page? |
@shaneafsar Can you say more about your development setup?
|
Yeah, I would expect it in the btw, happy to make a PR for this — I just wanted to first confirm that it's a known issue with any easy solutions, and not just something I'm missing 😅 |
We followed a recommendation from this issue: contentlayerdev/contentlayer#415 (comment) Some info about our setup:
It's been awhile, but we ran into the missing .contentlayer folder issue. Once the folder was created, it seemed to work properly and we could go back to using the recommended approach, but people pulling down the repo for the first time would encounter the issue. (There was another dev who had an infinite reload issue, but we hadn't narrowed that down). We'll try the recommended way in a couple sprints to see if the issue is still happening, and try to provide more detailed reproduction steps from there. |
When following the official Getting Started example for Next.js, the app fails to build on CI or any environemnt where
.contentlayer
doesn't exist already.This appears to be because TSC runs prior to contentlayer, which errors out.
I'm not sure if this can be changed at all (to run a Next plugin prior to the TSC step). That would seem like the ideal solution, but otherwise, would be great to update the documentation & examples to modify the build step
I'm happy to make a PR to help out, just wanted to check if this is indeed an issue that others experience or if I'm really missing something basic
The text was updated successfully, but these errors were encountered: