timlrx / contentlayer2

Contentlayer turns your content into data - making it super easy to import MD(X) and CMS content in your app
https://contentlayer.dev
MIT License
153 stars 11 forks source link

opentelemetry+exporter-trace-otlp-grpc Error #11

Closed Dmedina20 closed 4 months ago

Dmedina20 commented 4 months ago

When installing contentlayer with the plugin next-contentlayer I always encounter this error when trying to run my web application: Capture

Things I have tried: -Downgrading to compatible NextJS versions even downgrading to other Contentlayer versions (mostly used 0.3.1) -Tried installing Contentlayer in a fresh Nextjs project -Installing the module it says it is having trouble finding, it just acts like it doesn't exist -Have looked at reddit threads and original Contentlayer issue forums for similar issues and have tried all methods posted (from what I have found) that might fix the issue

What oddly works: For some reason when I clone this repo: https://github.com/shadcn-ui/taxonomy that uses Contentlayer for its blogs I run into no issues, even building on top of this repository and making other blogs doesn't break anything.

timlrx commented 4 months ago

Hi, are you using contentlayer2 and next-contentlayer2? The latest version is v0.4.5. Do not use the old contentlayer packages. And just to be certain, try deleting your node_modules folder and installing the dependencies again. If that does not work, would it be possible to share the repository or an simplified example repo with the bug? Thanks

k-ardliyan commented 4 months ago

Hi, I also experienced a similar error log when installing this package, but it was safe to run in local/prod in the condition that I had completely removed node_modules and reinstalled.

This is more or less the error log in the terminal error_log_terminal

And this package.json that I installed in my project, does it affect this package too? package.json

Can the error log be fixed?

timlrx commented 4 months ago

@k-ardliyan I have inlined and remove the dependency on @effect-ts/otel-exporter-trace-otlp-grpc. Try installing the latest version - v0.4.6, there should not be any warning messages.

I don't think it is exactly the same problem as @Dmedina20 though. The peer dependency issue should only throw a warning message but not any module not found error.

Dmedina20 commented 4 months ago

Hi, are you using contentlayer2 and next-contentlayer2? The latest version is v0.4.5. Do not use the old contentlayer packages. And just to be certain, try deleting your node_modules folder and installing the dependencies again. If that does not work, would it be possible to share the repository or an simplified example repo with the bug? Thanks

This worked for me! Thank you!

Dmedina20 commented 4 months ago

Issue closed