-
-
Notifications
You must be signed in to change notification settings - Fork 39
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] Cannot redefine toString
#10
Comments
Hello there I can work on this |
toString
toString
Feel free to work on it. |
It seems to happen randomly too. I encountered this error in several PRs (retrigger the PR works sometimes) Here is the error I got randomly in my local machine (note that I added
|
I found a workaround for Material UI: // next.config.js
module.exports = withPigment(nextConfig, {
theme,
transformLibraries: ['@mui/material'],
transformSx: true,
overrideContext: (context) => {
if (!context.$RefreshSig$) {
context.$RefreshSig$ = outerNoop;
}
return {
...context,
require: (id) => {
if (id === '@mui/styled-engine') {
// it's fine to return a dummy module for evaluation phase
return {
__esModule: true,
default: () => () => () => null,
internal_processStyles: () => {},
keyframes: () => '',
css: () => '',
};
}
return context.require(id);
},
};
},
}); |
Steps to reproduce
Link to repo: https://github.com/siriwatknp/nextjs-mui-v6
Steps:
pnpm install && pnpm run dev
Current behavior
Expected behavior
There should be no error.
Context
No response
Your environment
npx @mui/envinfo
Search keywords: pigment-css redefine toString
The text was updated successfully, but these errors were encountered: