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.

 Popper.js:9 Uncaught TypeError: styled_default is not a function

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Popper.js:9 Uncaught TypeError: styled_default is not a function im not able to run my app Screenshot 2022-05-11 at 12 38 53 PM

Expected behavior 🤔

it should run

Steps to reproduce 🕹

Steps: installed mui and try to run with vite

Context 🔦

No response

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

System:
    OS: macOS 11.6.2
  Binaries:
    Node: 14.17.0 - /usr/local/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 6.14.13 - /usr/local/bin/npm
  Browsers:
    Chrome: 101.0.4951.64
    Edge: Not Found
    Firefox: Not Found
    Safari: 14.1.2
  npmPackages:
    @emotion/react: ^11.9.0  => 11.9.0 
    @emotion/styled: ^11.8.1 => 11.8.1 
    @mui/base:  5.0.0-alpha.80 
    @mui/icons-material: ^5.6.2  => 5.6.2 
    @mui/lab: ^5.0.0-alpha.81  => 5.0.0-alpha.81 
    @mui/material: ^5.8.0 => 5.8.0 
    @mui/private-classnames:  5.7.0 
    @mui/private-theming:  5.7.0 
    @mui/styled-engine:  5.7.0 
    @mui/styles: ^5.7.0  => 5.7.0 
    @mui/system:  5.7.0 
    @mui/types:  7.1.3 
    @mui/utils:  5.7.0 
    @mui/x-data-grid: ^5.9.0 => 5.10.0 
    @mui/x-date-pickers:  5.0.0-alpha.0 
    @types/react:  18.0.9 
    react: ^17.0.0 => 17.0.2 
    react-dom: ^17.0.0 => 17.0.2 

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:9
  • Comments:41 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
dougrdaycommented, May 18, 2022

Our team is seeing the same error.

image

It seems to be:

  1. Related to using Vite.
  2. Intermittent, the problem comes and goes.
  3. Resolved (sometimes) by pnpm prune or removing node_modules folders
3reactions
aksalsfcommented, Aug 15, 2022

Got the same issue. Already removing node_modules and reinstalling again, but it didn’t work. Happened when using ThemeProvider.

image

Resolved by export the ThemeProvider properly using

import { ThemeProvider } from '@mui/material/styles';

previously

import { ThemeProvider } from '@mui/material';

@mui/material”: “^5.10.0” “vite”: “^3.0.5”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Popper styled_default is not a function Mui 5.6.0 [material-ui]
For me worked by change the ThemeProvider export path. after import { ThemeProvider } from '@mui/material/styles';. previously
Read more >
Unstyled React Popper component - MUI Base
The Unstyled Popper is a utility component for creating various kinds of popups. It relies on the third-party library (Popper.js v2) for positioning....
Read more >
react-popper - npm
Official library to use Popper on React projects. Latest version: 2.3.0, last published: 8 months ago. Start using react-popper in your ...
Read more >
uncaught typeerror: (0 , react__ ...
Uncaught TypeError : (0 , react__WEBPACK_IMPORTED_MODULE_0__.useState) is not a function or its return value is not iterable. Ask Question Asked 9 months ago ......
Read more >
Use Popper.js in Angular projects | by Sergey Gultyayev
The most important thing to realise when starting using Popper.js at first is that it does not apply any styles and effects. Meaning...
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