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

local development: command "pnpm i" causes dependency error in nextra-theme-docs 2.0.1 #1035

Closed
mi-hol opened this issue Dec 5, 2022 · 11 comments

Comments

@mi-hol
Copy link

mi-hol commented Dec 5, 2022

Just did a fresh "deploy" from https://nextra.site/docs/docs-theme/start

As documented in README.md
image

when I run pnpm i below error is caused.

dependencies:
+ next 13.0.6
+ nextra 2.0.1
+ nextra-theme-docs 2.0.1
+ react 18.2.0
+ react-dom 18.2.0

 WARN  Issues with peer dependencies found
.
└─┬ nextra-theme-docs 2.0.1
  └─┬ @reach/skip-nav 0.17.0
    ├── ✕ unmet peer react@"^16.8.0 || 17.x": found 18.2.0
    ├── ✕ unmet peer react-dom@"^16.8.0 || 17.x": found 18.2.0
    └─┬ @reach/utils 0.17.0
      ├── ✕ unmet peer react@"^16.8.0 || 17.x": found 18.2.0
      └── ✕ unmet peer react-dom@"^16.8.0 || 17.x": found 18.2.0
@mi-hol
Copy link
Author

mi-hol commented Dec 6, 2022

pnpm-lock.yaml generated in my local repository has the highlighted differences compared to same file in https://github.com/shuding/nextra-docs-template
Any suggestions for a workaround?

image

@mi-hol mi-hol changed the title dependency error in nextra-theme-docs 2.0.1 ? local development: command "pnpm i" causes dependency error in nextra-theme-docs 2.0.1 Dec 6, 2022
@mi-hol
Copy link
Author

mi-hol commented Dec 6, 2022

root cause seems reach/reach-ui#925

@phenomen
Copy link

phenomen commented Dec 6, 2022

root cause seems reach/reach-ui#925

Reach UI is not maintained anymore so it might worth considering getting rid of that library and replace it with Radix.

@mi-hol
Copy link
Author

mi-hol commented Dec 6, 2022

@phenomen thanks for hint

@shuding radix as used in UMAprotocol/voter-dapp-v2@527b1e0 looks like a quick and easy approach to fixing it. What is your thought?

@shuding
Copy link
Owner

shuding commented Dec 6, 2022

Makes sense to move away from Reach to Radix! Happy to accept a PR or I can do it next week 👍

@mi-hol
Copy link
Author

mi-hol commented Dec 6, 2022

reach/skip-nav is used only in examples/swr-site/pages/_document.js

would replacement with <div role="navigation"> as in https://www.w3.org/WAI/ARIA/apg/example-index/landmarks/navigation.html be a proper replacement?

@shuding
Copy link
Owner

shuding commented Dec 6, 2022

I don't think that does the same job. skip-nav provides this "skip to content" link when using tab to navigate the site:

CleanShot 2022-12-07 at 00 32 25@2x

@mi-hol
Copy link
Author

mi-hol commented Dec 7, 2022

Unfortunately I have no idea how to fix this issue :(

@mi-hol
Copy link
Author

mi-hol commented Dec 8, 2022

updated 08Dec2022 16:34 CET

@shuding after I manually reverted "pnpm-lock.yaml" to version from nextra-docs-template/pnpm-lock.yaml" error changes but I still can't get a successful build.
error message "Failed to compile." is not helpful :(

Any hint how I can get more information on root cause?

[16:27:09.100] Cloning github.com/mi-hol/boc-kb-v2 (Branch: main, Commit: 3e19730)
[16:27:09.970] Cloning completed: 869.843ms
[16:27:11.722] Restored build cache
[16:27:11.752] Running "vercel build"
[16:27:12.218] Vercel CLI 28.8.0
[16:27:12.545] Installing dependencies...
[16:27:13.032] Lockfile is up-to-date, resolution step is skipped
[16:27:13.056] Already up-to-date
[16:27:13.232] 
[16:27:13.241] Detected Next.js version: 13.0.6
[16:27:13.245] Running "pnpm run build"
[16:27:13.662] 
[16:27:13.662] > [email protected] build /vercel/path0
[16:27:13.662] > next build
[16:27:13.663] 
[16:27:14.162] info  - Linting and checking validity of types...
[16:27:15.778] info  - Creating an optimized production build...
[16:27:21.324] Failed to compile.
[16:27:21.324] 
[16:27:21.324] ./pages/99_HowToEditSite/2 Advanced formatting in Markdown.mdx
[16:27:21.325] Module not found: Package path ./callout is not exported from package /vercel/path0/node_modules/nextra-theme-docs (see exports field in /vercel/path0/node_modules/nextra-theme-docs/package.json)
[16:27:21.325] 
[16:27:21.325] 
[16:27:21.325] > Build failed because of webpack errors
[16:27:21.347]  ELIFECYCLE  Command failed with exit code 1.
[16:27:21.363] Error: Command "pnpm run build" exited with 1```

@mi-hol
Copy link
Author

mi-hol commented Dec 8, 2022

update:

after I removed the mdx file using "callout", build succeeded but it seems to indicate another error in nextra-theme-docs

./pages/99_HowToEditSite/2 Advanced formatting in Markdown.mdx
Module not found: Package path ./callout is not exported from package /vercel/path0/node_modules/nextra-theme-docs (see exports field in /vercel/path0/node_modules/nextra-theme-docs/package.json)

@arsnl
Copy link
Contributor

arsnl commented Dec 9, 2022

Fix #1051

@shuding shuding closed this as completed Dec 31, 2022
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