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

[core] GitHubIcon and GoogleIcon ignored by rsc script #38023

Closed
2 tasks done
dakivara opened this issue Jul 18, 2023 · 3 comments · Fixed by #38132
Closed
2 tasks done

[core] GitHubIcon and GoogleIcon ignored by rsc script #38023

dakivara opened this issue Jul 18, 2023 · 3 comments · Fixed by #38132
Assignees
Labels
core Infrastructure work going on behind the scenes

Comments

@dakivara
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

No response

Current behavior 😯

No response

Expected behavior 🤔

No response

Context 🔦

The error message that is returned is:

Error: Attempted to call the default export of /Users/danijel/WebstormProjects/apix-website/node_modules/@mui/icons-material/utils/createSvgIcon.js from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.

I assume the reason is that both icons miss the "use client" directive. With other icons there are no problems.

Your environment 🌎

System:
OS: macOS 13.1
Binaries:
Node: 16.17.0 - /usr/local/bin/node
Yarn: Not Found
npm: 8.15.0 - /usr/local/bin/npm
Browsers:
Chrome: 114.0.5735.198
Edge: Not Found
Safari: 16.2
npmPackages:
@emotion/react: ^11.11.1 => 11.11.1
@emotion/styled: ^11.11.0 => 11.11.0
@mui/base: 5.0.0-beta.7
@mui/core-downloads-tracker: 5.14.0
@mui/icons-material: ^5.14.0 => 5.14.0
@mui/material: ^5.14.0 => 5.14.0
@mui/private-theming: 5.13.7
@mui/styled-engine: 5.13.2
@mui/system: 5.14.0
@mui/types: 7.2.4
@mui/utils: 5.13.7
@types/react: 18.2.15
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
typescript: 5.1.6

@dakivara dakivara added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 18, 2023
@dakivara
Copy link
Author

dakivara commented Jul 18, 2023

Issue does not appear when you put the 'use client' directive at the top of the page script

@dakivara
Copy link
Author

dakivara commented Jul 18, 2023

Closing the issue

@zannager zannager added package: system Specific to @mui/system and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 19, 2023
@mj12albert mj12albert reopened this Jul 20, 2023
@mj12albert mj12albert self-assigned this Jul 20, 2023
@mj12albert mj12albert changed the title GitHubIcon and GoogleIcon cause server error in next.js [core] GitHubIcon and GoogleIcon ignored by rsc script Jul 20, 2023
@mj12albert
Copy link
Member

@dan-apix Thanks for reporting this! It's a legit issue, there are a handful of icons outside of the /src directory that I overlooked 😅

@mj12albert mj12albert added core Infrastructure work going on behind the scenes and removed package: system Specific to @mui/system labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants