makeStyles stopped working
See original GitHub issueI have been working on a project for 3 weeks with the same depencies even deployed to server. Now all of a sudden I get error during dev and build
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.27",
"@fortawesome/free-brands-svg-icons": "^5.12.1",
"@fortawesome/free-regular-svg-icons": "^5.12.1",
"@fortawesome/free-solid-svg-icons": "^5.12.1",
"@fortawesome/react-fontawesome": "^0.1.8",
"@material-ui/core": "^4.9.5",
"@material-ui/icons": "^4.9.1",
"@material-ui/styles": "^4.9.0",
"@material-ui/system": "^4.9.3",
"@mui-treasury/layout": "^3.3.3",
"@mui-treasury/mockup": "^0.4.5",
"axios": "^0.19.2",
"dotenv": "^8.2.0",
"moment": "^2.24.0",
"mui-layout": "^1.2.9",
"next": "^9.2.2",
"next-compose-plugins": "^2.2.0",
"next-transpile-modules": "^3.1.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-moment": "^0.9.7",
"react-reveal": "^1.2.2"
},
Current Behavior 😯
Fails to build with error:
ready ] compiled successfully - ready on http://localhost:3000
[ event ] build page: /profile
[ wait ] compiling ...
[ error ] ./node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js
Attempted import error: 'getDynamicStyles' is not exported from 'jss'.
get initial props
api_url http://localhost:3018
Could not find files for /profile in .next/build-manifest.json
TypeError: (0 , _jss.getDynamicStyles) is not a function
at attach (/Applications/MAMP/htdocs/PROJECTS/src/frontend/node_modules/@material-ui/styles/makeStyles/makeStyles.js:131:60)
Expected Behavior 🤔
Should build as usual
Steps to Reproduce 🕹
Steps:
Context 🔦
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v4.?.? |
React | |
Browser | |
TypeScript | |
etc. |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:15 (1 by maintainers)
Top Results From Across the Web
makeStyles function is not working in Material UI
Based on the MUI Documentation: ⚠️ @mui/styles is the legacy styling solution for MUI. It depends on JSS as a styling solution, which...
Read more >[styles] makeStyles not working with theme #31030 - GitHub
I just migrated from v4 to v5. ... However, the theme passed to makeStyles is just an empty object {}. ... MUI: The...
Read more >Troubleshooting - Material UI - MUI
This error arises because makeStyles is now exported from the @mui/styles package, which does not know about Theme in the core package. To...
Read more >Material-UI Table makeStyles not working : r/reactjs - Reddit
I am not able to add changes to the material-ui Table using makeStyles import * as React from 'react'; import Table from ...
Read more >Material UI {makeStyles} PLease help - JavaScript
I'm having trouble with Material UI's makeStyles function. ... It's not working with react 18, the version of Material UI you're using has ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reinstall your dependencies. That should do the trick.
It’s not core, it’s styles
@material-ui/styles