contentlayerdev / contentlayer

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

Compatibility Request: Support for Next.js 14 in next-contentlayer #665

Open AcidOP opened 2 months ago

AcidOP commented 2 months ago

I'm currently using Next.js 14 and encountered a peer dependency warning when trying to install next-contentlayer:

Running yarn add -D contentlayer next-contentlayer date-fn yields the following error:

warning " > next-contentlayer@0.3.4" has incorrect peer dependency "next@^12 || ^13"

Latest Nextjs 15 is the latest version and this should be updated.

Or maybe there is a workaround?

Koala0CE commented 2 months ago

I got the same issue here

lukahukur commented 1 month ago

Repo is dead, if you just starting new project avoid using this package.

AcidOP commented 1 month ago

Seems like this package is dead due to funding issues :(

ghost commented 1 month ago

Add this to your package.json to override the peer dependency version or use the maintained version of contentlayer called contentlayer2 (https://github.com/contentlayerdev/contentlayer/issues/651#issuecomment-2030335434):

"overrides": {

    "next-contentlayer": {
        "next": "$next"
    }

}
Koala0CE commented 1 month ago

Add this to your package.json to override the peer dependency version or use the maintained version of contentlayer called contentlayer2 (#651 (comment)):

"overrides": {

    "next-contentlayer": {
        "next": "$next"
    }

}

I used the maintained version, thank you for letting us know about it.