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

Cannot access DynamicSidebar.then on the server. You cannot dot into a client module from a server component. You can only pass the imported name through. #809

Closed
donghhan opened this issue Sep 5, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@donghhan
Copy link

donghhan commented Sep 5, 2024

Reproducing code

1. Auto-create project

Run the command code shown on documentation

npx create-fumadocs-app

2. Run in dev mode (without touching any NPM packages at all)

npm run dev

3. Accessing to /docs url

Current vs. Expected behavior

Expected behavior is just to render the example fumadocs UI example correctly, but then when I run in dev mode, I got the following error below:

Internal error: Error: Cannot access DynamicSidebar.then on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
    at Object.get (/Users/apensia/dev/please-work-shit-man/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:253838)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "1707106195"

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.11.0
  npm: 10.4.0
  Yarn: 1.22.19
  pnpm: 8.15.1
Relevant Packages:
  next: 14.2.8 // Latest available version is detected (14.2.8).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

UI

Additional context

No response

@donghhan donghhan added the bug Something isn't working label Sep 5, 2024
@fuma-nama
Copy link
Owner

fuma-nama commented Sep 5, 2024

I've successfully reproduced the problem, Next.js 14.2.8 contains problems on dynamic import with client components. You have to downgrade to 14.2.7 for now

@donghhan
Copy link
Author

donghhan commented Sep 5, 2024

@fuma-nama I am currently using Next.js version of 14.2.8, which your auto project creating code automatically configures.

Also, Next.js version of 12.2.7 is not available afaik.

@fuma-nama
Copy link
Owner

Oops some typos, set next to 14.2.7 on your package.json (no ^ prefix).

@donghhan
Copy link
Author

donghhan commented Sep 5, 2024

@fuma-nama Solved the problem. Thank you for help. Closing issue

@donghhan donghhan closed this as completed Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants