Skip to content

Popper.js:11 Uncaught TypeError: styled_default is not a function at Popper.js:11:20 #36515

Closed
@Nefcanto

Description

Steps to reproduce 🕹

Link to live example: https://github.com/Nefcanto/MuiPopperBug

Steps:

  1. git clone https://github.com/Nefcanto/MuiPopperBug
  2. cd MuiPopperBug
  3. npm install
  4. npm run dev
  5. Browse and see the error

Current behavior 😯

Popper complains about styled_default and does not give us more information to debug this. All I see in my console is:

Popper.js:11 Uncaught TypeError: styled_default is not a function
    at Popper.js:11:20
(anonymous) @ Popper.js:11

And I see nothing in my terminal. I have no clue. None.

Expected behavior 🤔

When an error occurs, you should give us more data, at least a call stack that contains something related to our code.

What component of mine has caused this issue? What should I do to debug this?

In a real-world application with hundreds or sometimes thousands of components, it's impossible to go for trial and error.

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
  System:
    OS: Linux 5.19 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
  Binaries:
    Node: 18.15.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.6.1 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @emotion/react: ^11.10.6 => 11.10.6 
    @emotion/styled: ^11.10.6 => 11.10.6 
    @mui/base:  5.0.0-alpha.121 
    @mui/core-downloads-tracker:  5.11.13 
    @mui/icons-material: ^5.11.11 => 5.11.11 
    @mui/lab: ^5.0.0-alpha.101 => 5.0.0-alpha.123 
    @mui/material: ^5.11.13 => 5.11.13 
    @mui/private-theming:  5.11.13 
    @mui/styled-engine:  5.11.11 
    @mui/system:  5.11.13 
    @mui/types:  7.2.3 
    @mui/utils:  5.11.13 
    @mui/x-date-pickers: ^6.0.1 => 6.0.1 
    @types/react: ^18.0.27 => 18.0.28 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 

I'm inside a docker container. My local browser is:

Chrome 111.0.5563.64 (Official Build) (64-bit) 

Metadata

Assignees

Labels

component: PopperThe React component. See <Popup> for the latest version.external dependencyBlocked by external dependency, we can’t do anything about it

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions