Skip to content
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

Create Next Docs App failed with Contentlayer #148

Closed
1 of 3 tasks
CMAULTOP opened this issue Nov 2, 2023 · 7 comments
Closed
1 of 3 tasks

Create Next Docs App failed with Contentlayer #148

CMAULTOP opened this issue Nov 2, 2023 · 7 comments

Comments

@CMAULTOP
Copy link

CMAULTOP commented Nov 2, 2023

nothing was fixed, everything worked for me through pnpx. Only this works in rpm:
(where the check mark works)

  • Default (Contentlayer)
  • Advanced (Contentlayer)
  • Default (Next Docs MDX)

Error when Default:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/next
npm ERR!   next@"14.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^12 || ^13" from [email protected]
npm ERR! node_modules/next-contentlayer
npm ERR!   next-contentlayer@"0.3.4" 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.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/codespace/.npm/_logs/2023-11-02T10_16_18_972Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/codespace/.npm/_logs/2023-11-02T10_16_18_972Z-debug-0.log
Install failed

Advanced:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: gdfg\@0.0.0
npm ERR! Found: [email protected]
npm ERR! node_modules/next
npm ERR!   next@"14.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^12 || ^13" from [email protected]
npm ERR! node_modules/next-contentlayer
npm ERR!   next-contentlayer@"0.3.4" 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.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/codespace/.npm/_logs/2023-11-02T10_17_58_568Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/codespace/.npm/_logs/2023-11-02T10_17_58_568Z-debug-0.log
Install failed

Again, I will say that I tested on github codespaces and I think that there are updated versions and working.

@fuma-nama
Copy link
Owner

Contentlayer doesn't support Next.js 14 in their peer dependency yet, you have to disable peer deps error and try again. Pnpm won't throw an error for missing peer deps issue, you can use it as a workaround.

@fuma-nama
Copy link
Owner

fuma-nama commented Nov 2, 2023

Please use Next Docs MDX if you don't need Contentlayer specific functionality

@fuma-nama fuma-nama changed the title not working npx (continued) Create Next Docs App failed with Contentlayer Nov 2, 2023
@fuma-nama
Copy link
Owner

fuma-nama commented Nov 14, 2023

Surprisingly this PR hasn't been merged: contentlayerdev/contentlayer#576, I'll leave this issue for now until they officially release a fix.

@xXQiuChenXx
Copy link

xXQiuChenXx commented Jan 15, 2024

Just add --legacy-peer-deps in your command, and it should work well.

Example: npm install --legacy-peer-deps

@fuma-nama
Copy link
Owner

According to the state of Contentlayer: contentlayerdev/contentlayer#429, I'll recommend Fumadocs MDX if you don't need any Contentlayer-only features.

@fuma-nama
Copy link
Owner

Will close this as Next.js 15 RC has been released, we will focus on Fumadocs MDX until Contentlayer has resumed maintenance.

@fuma-nama fuma-nama closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@xXQiuChenXx @CMAULTOP @fuma-nama and others