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

[material-ui][Timeline] Not working with server-side in an App Router Next.js project #40349

Closed
2 tasks done
OmkarOza opened this issue Dec 28, 2023 · 3 comments · Fixed by #40358
Closed
2 tasks done
Assignees
Labels
bug 🐛 Something doesn't work component: timeline This is the name of the generic UI component, not the React module! nextjs package: material-ui Specific to @mui/material

Comments

@OmkarOza
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

No response

Current behavior 😯

When using the Timeline component in NEXT.JS(App Router) , I have observed that it functions correctly on the client side but does not seem to work as expected on the server side. In contrast, other Material-UI (MUI) components exhibit consistent behavior, functioning seamlessly on both the client and server sides.

Expected behavior 🤔

It is expected that the Timeline component should operate smoothly on the server side, just like other MUI components, without encountering any issues.

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
  System:
    OS: Windows 10 10.0.19045
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Chromium (120.0.2210.77)
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.1
    @emotion/styled: ^11.11.0 => 11.11.0
    @mui/base:  5.0.0-beta.24
    @mui/core-downloads-tracker:  5.14.18
    @mui/lab: 5.0.0-alpha.153 => 5.0.0-alpha.153
    @mui/material: ^5.14.18 => 5.14.18
    @mui/private-theming:  5.14.18
    @mui/styled-engine:  5.14.18
    @mui/system:  5.14.18
    @mui/types:  7.2.9
    @mui/utils:  5.14.18
    @types/react:  18.2.39
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    typescript: ~5.3.2 => 5.3.2
@OmkarOza OmkarOza added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 28, 2023
@zannager zannager added the component: timeline This is the name of the generic UI component, not the React module! label Dec 28, 2023
@danilo-leal danilo-leal changed the title MUI Timeline Component is Not Working on Sever Side when using it with NEXT.JS(App Router) . [material-ui][Timeline] Not working with server-side in an App Router Next.js project Dec 28, 2023
@danilo-leal danilo-leal added package: material-ui Specific to @mui/material nextjs labels Dec 28, 2023
@DiegoAndai DiegoAndai assigned DiegoAndai and unassigned mnajdova Dec 28, 2023
@DiegoAndai
Copy link
Member

DiegoAndai commented Dec 28, 2023

Hey @OmkarOza, thanks for the report! Please provide a minimal reproduction test case with the latest version. This would help a lot. A live example would be perfect. Thank you!

@DiegoAndai DiegoAndai added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 28, 2023
@OmkarOza
Copy link
Author

Hey @DiegoAndai, I am using the same code, which can be found at https://codesandbox.io/p/sandbox/interesting-antonelli-y554j2?file=%2Fsrc%2FDemo.tsx, but when I try to use it with NEXT.JS (App Router) on the server side, it doesn't work as expected.

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Dec 29, 2023
@DiegoAndai
Copy link
Member

I opened #40358 to see if that fixes it. May I ask you to try it out? You can do so by pointing to that PR's build in package.json:

 "dependencies": {
-  "@mui/lab": "latest", // or whatever version you had
+  "@mui/lab": "https://pkg.csb.dev/mui/material-ui/commit/6df98ce0/@mui/material",
 },

@DiegoAndai DiegoAndai added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 29, 2023
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Dec 29, 2023
@DiegoAndai DiegoAndai removed the status: waiting for author Issue with insufficient information label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: timeline This is the name of the generic UI component, not the React module! nextjs package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants