question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

makeStyles stopped working

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Vadorequestcommented, Mar 15, 2020

Reinstall your dependencies. That should do the trick.

1reaction
Vadorequestcommented, Mar 15, 2020

It’s not core, it’s styles

@material-ui/styles

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found