material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

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

Open DavidArmendariz opened this issue 1 year ago • 1 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] 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 avatar Aug 09 '22 18:08 DavidArmendariz

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.

cjones26 avatar Aug 09 '22 20:08 cjones26

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?

mpanjato avatar Aug 10 '22 08:08 mpanjato

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]

cjones26 avatar Aug 10 '22 13:08 cjones26

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

mnajdova avatar Aug 10 '22 14:08 mnajdova

@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?

DavidArmendariz avatar Aug 10 '22 15:08 DavidArmendariz

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

giladv avatar Aug 10 '22 21:08 giladv

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

DavidArmendariz avatar Aug 10 '22 21:08 DavidArmendariz

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

giladv avatar Aug 10 '22 21:08 giladv

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).

cjones26 avatar Aug 10 '22 21:08 cjones26

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 avatar Aug 10 '22 21:08 giladv

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

giladv avatar Aug 10 '22 22:08 giladv

👋 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.

github-actions[bot] avatar Aug 11 '22 09:08 github-actions[bot]

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! 🙏

m2mathew avatar Aug 11 '22 18:08 m2mathew

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. https://github.com/mui/material-ui/issues/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 avatar Aug 12 '22 11:08 mnajdova

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. 😅

m2mathew avatar Aug 12 '22 15:08 m2mathew

@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 :))

mnajdova avatar Aug 19 '22 10:08 mnajdova

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

mpanjato avatar Aug 19 '22 15:08 mpanjato

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?

PrimulaX avatar Aug 26 '22 21:08 PrimulaX

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

ndtreviv avatar Apr 23 '23 19:04 ndtreviv

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.

mnajdova avatar May 05 '23 08:05 mnajdova

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

beshur avatar Mar 16 '24 15:03 beshur