-
Notifications
You must be signed in to change notification settings - Fork 201
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
Error when building with contentlayer 0.3.4 and Next.js 13 App Router #506
Comments
Downgrading to version |
Same issue, can confirm it |
It's not related to the |
I guess that is because both Next.js and Contentlayer use open telemetry as a dependency. |
Confirmed. {
"name": "app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"pnpm": {
"overrides": {
"@opentelemetry/api": "1.4.1",
"@opentelemetry/core": "1.13.0",
"@opentelemetry/exporter-trace-otlp-grpc": "0.39.1",
"@opentelemetry/resources": "1.13.0",
"@opentelemetry/sdk-trace-base": "1.13.0",
"@opentelemetry/sdk-trace-node": "1.13.0",
"@opentelemetry/semantic-conventions": "1.13.0"
}
},
"dependencies": {
"contentlayer": "^0.3.3",
"next": "13.4.8",
"next-contentlayer": "^0.3.3"
}
} |
@brianschnee it is not related to the App router, but rather to ESM; don't know what contentlayer has changed but the package stopped building properly when using |
that pnpm override -- what a great discovery. Wish I looked 3 hours ago haha. |
The same for me... using |
same error |
is there a combo of versions for
that will work temporarily? |
@emptypockets-dev I'm using |
ah mah dude, big props to you, this worked wonderfully |
Amazing - thanks! Unfortunately errors are still thrown if you have any mdxComponents in your mdx file, such as
|
That’s likely a bug caused by Contentlayer itself. You can open another issue instead. |
I'm seeing this same error after running a plain ol' |
I'm facing the same issue |
npm also supports |
I ran into the same error as contentlayerdev/contentlayer#506 (comment)
This is the equivalent version for
Remember to run |
For the
|
Not to rush anybody but there's a bunch of people in the issues, discussions, and PRs who would be happy to help. Is there any chance the Maintainers can take a look at/accept some of the help? |
Started seeing a lot of these errors today:
The fix above had originally worked for me. Not sure if this new error is related to this package. |
It is a Next.js issue that lasted for a while, see vercel/next.js#51130 |
Been researching this for an hour or so (maybe I'm bad at Googling), this is the first workaround I've found that's worked for me. |
After a whole month, i'm still having the same problem: [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of /home/gfgarcia2007/courses/blog-next-course/node_modules/@contentlayer/core/dist/dynamic-build.js for build dependencies failed at 'import( My package.json: I use npm. Does anyone have a clue on what to do? I've already played with contentlayer and next versions but nothing worked. |
I've just tested locally with |
Not on my side. The only way to make it build for me is still:
|
I've found this issue so hard to replicate, for example with @thedevdavid's configuration above, first time I build and push to Vercel it works 🎉, I then squash some commits (force push 🙈 to tidy up this mess) and now I'm getting ❌ build errors...
Always builds and works locally, only when deploying to Vercel I get issues... Seems like something to do with cached files / .contentlayer directory / the pinned dependencies versions but I'm struggling to replicate! Am I missing anything? Anyone else in this situation? |
hey, cool, with which version of contentlayer? |
The latest version, 0.3.4 works for me |
with which versions of next / next-contentlayer? |
Exactly the latest versions of both of them, next 13.4.19 and contentlayer 0.3.4. Not sure it's working for everyone, but at least I got it working in CodeSandbox |
I tried switching from npm to pnpm in my personal project, but I'm still encountering the I'm hoping that this issue will be fixed soon 🙏 |
Still facing this same issue with Turbo, pnpm, and Next.js 13.5.4. Been months |
I encountered this issue after upgrading Checking out the commit before the upgrade resolves the issue. (I recognize that this isn't a rigorous set of steps to repro, etc - but hopefully this is helpful to anyone reading along) For now my game plan is to pin |
In next.js 14.0.4, I still have the same issue. I guess I'll just have to do what I suggested above. |
Same problem here... Neither of the proposed changes works for me. Using Turborepo. When I run pnpm dev it complains about many unmet dependencies for contentlayer: esbuild · unmet peer esbuild@"0.17.x || 0.18.x": found 0.19.11 This is my package.json
Any support will be much appreciated. |
Struggled so many times with contentlayer and these opentelementary issues. Recommend anyone else running into this just learn how to build a markdown blog from scratch. This is an absolute waste of time and I would not recommend it at all. I have used contentlayer for several years. And have it installed in many project. I often run into these terrible dependency issues that just take forever to debug. I've solved it several times but my latest nextjs14 install has the same issue again. Pulling the plug on this dependency. It's a pity that this was not properly maintained. The contenlayer2 repo has the same issues. |
I would recommend content collections, its API is similar to Contentlayer and is well maintained. |
So the question is: Why does ContentLayer has open-telemetry as one of its dependencies? |
When I run
pnpm contentlayer build
, I run into an error within node_modules and cannot resolve it.Versions
Error Message
The text was updated successfully, but these errors were encountered: