You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
mj12albert
changed the title
GitHubIcon and GoogleIcon cause server error in next.js
[core] GitHubIcon and GoogleIcon ignored by rsc script
Jul 20, 2023
Duplicates
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
The text was updated successfully, but these errors were encountered: