Skip to content
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

export 'internal_processStyles' (imported as 'processStyles') was not found in '@mui/styled-engine' #33878

Closed
2 tasks done
DavidArmendariz opened this issue Aug 9, 2022 · 21 comments
Labels
support: Stack Overflow Please ask the community on Stack Overflow

Comments

@DavidArmendariz
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

The React app won't start as this error pops up when I run yarn start on my project with the latest version of @mui/material (5.10.0). The error I am seeing is:

Compiled with problems:X

ERROR in ./node_modules/@mui/system/esm/createStyled.js 106:4-17

export 'internal_processStyles' (imported as 'processStyles') was not found in '@mui/styled-engine' (possible exports: GlobalStyles, StyledEngineProvider, ThemeContext, css, default, keyframes)

Expected behavior 🤔

My React app should compile without errors.

Steps to reproduce 🕹

Not completely sure where this error is arising from.

Steps:

  1. Upgrade to @mui/material at version 5.10.0
  2. I am using also styled-components at version 5.3.5
  3. In my tests, it points that the error is coming from here import { createTheme } from '@mui/material/styles';

Context 🔦

I just got an update of @mui/material from dependabot and all my tests are failing. I am just trying to upgrade this dependency.

Your environment 🌎

npx @mui/envinfo
  System:
    OS: Linux 5.15 Ubuntu 20.04.4 LTS (Focal Fossa)
  Binaries:
    Node: 17.9.0 - ~/.nvm/versions/node/v17.9.0/bin/node
    Yarn: 1.22.18 - ~/.nvm/versions/node/v17.9.0/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v17.9.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.79
    Firefox: 103.0
  npmPackages:
    @mui/base:  5.0.0-alpha.92 
    @mui/material: ^5.10.0 => 5.10.0 
    @mui/private-theming:  5.9.3 
    @mui/styled-engine-sc:  5.4.2 
    @mui/system: ^5.10.0 => 5.10.0 
    @mui/types:  7.1.5 
    @mui/utils:  5.9.3 
    @mui/x-data-grid:  5.15.1 
    @mui/x-data-grid-pro: ^5.15.1 => 5.15.1 
    @mui/x-license-pro: ^5.15.0 => 5.15.0 
    @types/react: ^17.0.40 => 17.0.40 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 
    styled-components: ^5.3.5 => 5.3.5 
    typescript: ^4.7.4 => 4.7.4
@DavidArmendariz DavidArmendariz added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 9, 2022
@cjones26
Copy link

cjones26 commented Aug 9, 2022

Same issue here -- we didn't change anything on our end so it appears that it's a transitive dependency which is likely causing the issue.

@mpanjato
Copy link

i have the same error : 'internal_processStyles' is not exported from '@mui/styled-engine' (imported as 'processStyles')
Version mui : "@mui/material": "5.4.4"
Version React : "17.0.2"
is this issue still in progress?

@cjones26
Copy link

Just a heads up @DavidArmendariz & @mpanjato, I was able to resolve this issue by upgrading the following packages to the latest version:

@mui/[email protected] -> @mui/[email protected]
@mui/[email protected] -> @mui/[email protected]
@mui/[email protected] -> @mui/[email protected]
@mui/[email protected] -> @mui/[email protected]

@mnajdova
Copy link
Member

Did you also upgrade the @mui/styled-engine/@mui/styled-engine-sc package too?

@DavidArmendariz
Copy link
Author

DavidArmendariz commented Aug 10, 2022

@cjones26 @mnajdova Thanks! It worked! I guess dependabot doesn't make upgrades to @mui/styled-engine because of the way it is specified in package.json?

"dependencies: {
  "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
  ...
},
"resolutions": {
  "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
}

Is this still the correct way to specify @mui/styled-engine package?

@giladv
Copy link

giladv commented Aug 10, 2022

any news on this? my dev env is unusable without me changing anything

@DavidArmendariz
Copy link
Author

@giladv upgrading @mui/styled-engine worked for me.

@giladv
Copy link

giladv commented Aug 10, 2022

doesn't work with styled-engine-sc unfortunately for me

@cjones26
Copy link

doesn't work with styled-engine-sc unfortunately for me

Try updating all MUI related packages. If that still doesn't work, it's likely another third-party package is pulling in an older version of @mui/styled-engine-sc and / or @mui/material which you may need to add to overrides (if using npm) or resolutions (if using yarn).

@giladv
Copy link

giladv commented Aug 10, 2022

nothing works.

  • tried updating all packages to latest
  • removing yarn.lock

for some reason styled-engine-sc is staying 5.8 while there's already a 5.10

@giladv
Copy link

giladv commented Aug 10, 2022

FINALLY. for anyone having problem with this make [email protected] will not work with latest mui/system version.
do everything you can to make yarn upgrade it. including messing with yarn.lock

@mnajdova mnajdova added support: Stack Overflow Please ask the community on Stack Overflow and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 11, 2022
@github-actions
Copy link

👋 Thanks for using MUI Core!

We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.

For support, please check out https://mui.com/getting-started/support/. Thanks!

If you have a question on Stack Overflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@m2mathew
Copy link
Member

m2mathew commented Aug 11, 2022

The solution to return to 5.8.0 was not working for me with these values in package.json (using yarn):

"dependencies": {
  "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
  "@mui/styled-engine-sc": "5.8.0"
},
"resolutions": {
  "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
},

However, our app builds correctly with this package in dependencies:

"@mui/styled-engine-sc": "5.9.3",

By the way, we are finally upgrading the Text-Em-All web app to MUI v5...the app that started this entire project. Thanks for the continuing development and care that you put into MUI, everyone! 🙏

@mnajdova
Copy link
Member

By the way, we are finally upgrading the Text-Em-All web app to MUI v5...the app that started this entire project. Thanks for the continuing development and care that you put into MUI, everyone! 🙏

Nice to hear this! :) Out of curiosity @m2mathew, why did you decided to use styled-components instead of emotion? There are still some issues around it, related to SSR, e. g. #29742. I am curious to knwo what's the reason for people to put additional effort just to be able to use styled-components.

@m2mathew
Copy link
Member

By the way, we are finally upgrading the Text-Em-All web app to MUI v5...the app that started this entire project. Thanks for the continuing development and care that you put into MUI, everyone! 🙏

Nice to hear this! :) Out of curiosity @m2mathew, why did you decided to use styled-components instead of emotion? There are still some issues around it, related to SSR, e. g. #29742. I am curious to knwo what's the reason for people to put additional effort just to be able to use styled-components.

@mnajdova We had already moved about 50% of the web app to use styled-components in Material-UI v4 instead of JSS. It seemed like an easier solution to use styled-components for MUI v5, too. Our web app is client-side rendered, so we don't have any issues with it...at least not in the giant feature PR that is making this change. 😅

@mnajdova
Copy link
Member

@mnajdova We had already moved about 50% of the web app to use styled-components in Material-UI v4 instead of JSS. It seemed like an easier solution to use styled-components for MUI v5, too. Our web app is client-side rendered, so we don't have any issues with it...at least not in the giant feature PR that is making this change. 😅

Sounds like it should work as expected, thanks for the info :))

@mpanjato
Copy link

@cjones26 & @mnajdova thank you, upgrading @mui/styled-engine worked for me too

@PrimulaX
Copy link

I don't know how it's possible but after updating InputBase stop accepting styles.
here is my pkgs:

"@mui/lab": "^5.0.0-alpha.91",
"@mui/material": "^5.10.2",
"@mui/x-data-grid-premium": "^5.16.0",
"@mui/x-license-pro": "^5.16.0",
"overrides": {
    "@mui/styled-engine": "https://registry.npmjs.org/@mui/styled-engine-sc/-/styled-engine-sc-5.10.1.tgz"
}

And downgrade causes the same problem as mentioned in issue.

Any idea?

@ndtreviv
Copy link

I'm getting this suddenly despite having changed no dependency versions.
It seems to be tracking it back to @mui/lab/Masonry:

ERROR in ./node_modules/@mui/lab/node_modules/@mui/system/esm/createStyled.js 115:4-17
export 'internal_processStyles' (imported as 'processStyles') was not found in '@mui/styled-engine' (possible exports: GlobalStyles, StyledEngineProvider, ThemeContext, css, default, keyframes)
 @ ./node_modules/@mui/lab/node_modules/@mui/system/esm/index.js 35:0-57 35:0-57 36:0-31 36:0-31
 @ ./node_modules/@mui/lab/Masonry/Masonry.js 6:0-139 64:24-47 68:22-40 72:27-35 83:29-46 86:23-46 94:56-64 102:29-46 107:31-48 113:24-32
 @ ./node_modules/@mui/lab/Masonry/index.js 1:0-36 1:0-36

@mnajdova
Copy link
Member

mnajdova commented May 5, 2023

I'm getting this suddenly despite having changed no dependency versions.
It seems to be tracking it back to @mui/lab/Masonry:

Can you please create an issue with reproduction? Would be great to know the specific versions you use.

@beshur
Copy link

beshur commented Mar 16, 2024

I had this fixed with 'use client' in NextJS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support: Stack Overflow Please ask the community on Stack Overflow
Projects
None yet
Development

No branches or pull requests

9 participants