Replies: 12 comments 8 replies
-
Getting the exact same error. |
Beta Was this translation helpful? Give feedback.
-
has anyone solved this ? |
Beta Was this translation helpful? Give feedback.
-
I had @esbuild-plugins/node-globals-polyfill and removing it solved my issue. |
Beta Was this translation helpful? Give feedback.
-
Could you please share I had similar issue and problem was in |
Beta Was this translation helpful? Give feedback.
-
This is my
And this is the error I get (everything works for
What should I do? |
Beta Was this translation helpful? Give feedback.
-
Having the exact same issue. Had anyone found a solution? |
Beta Was this translation helpful? Give feedback.
-
The only solution for me has been replacing the package using "jss-plugin-window" which in my case was Basically, it is deprecated in material-ui v5 (mui) and is not compatible with React 18. So is not a good choice if you plan to use react 18 at some point |
Beta Was this translation helpful? Give feedback.
-
I found out that using custom alias for jss plugins allows to fix that. Full config:
Replacing
I'm not sure anymore if |
Beta Was this translation helpful? Give feedback.
-
After more study, my issue came from
Getting rid of that solved the issue for me without requiring workaround @lsrugo very good chance your issue is similar and you had something like
in your config |
Beta Was this translation helpful? Give feedback.
-
In my case I installed @mui/system as the npm page says an it worked: |
Beta Was this translation helpful? Give feedback.
-
This is likely due to having However, the Vite docs specifically warn against doing this, as it basically acts as a giant find-and-replace, changing things like A way to fix this is to get rid of the define in your config, and instead put something like this at the top of your index.js/index.tsx: if (typeof window.global === "undefined") window.global = window; |
Beta Was this translation helpful? Give feedback.
-
I was converting my old CRA codebase to vite yesterday and suddenly got this problem when I tried to build my application. My solution was to replace "makeStyles" import from "@material-ui/styles" to "@material-ui/core" and it all worked. I hope it helps. MUI: v4.11.0 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to migrate a project from CRA to Vite. When I run
vite
it works fine butvite build
throws this error:In my
package.json
I haveBeta Was this translation helpful? Give feedback.
All reactions