When I am trying to install next-contentlayer in nextjs 14.1.0. It's showing error. I can't install next-contentlayer. Can anyone suggest me how can I install it?
`npm install next-contentlayer
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ranadev@0.1.0
npm ERR! Found: next@14.1.0
npm ERR! node_modules/next
npm ERR! next@"14.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^12 || ^13" from next-contentlayer@0.3.4
npm ERR! node_modules/next-contentlayer
npm ERR! next-contentlayer@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken)
dependency resolution.
Basically there is a dependency conflict for next-contentlayer as it need needs next 12 or 13 and the maintainers have not updated for next 14 yet
You can try 2 things
npm install next@13.5.6
npm install next-contentlayer
npm install next-contentlayer --force