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

MUI Joy UI Autocomplete crashing my app #42612

Open
jesuschrist-immanuel opened this issue Jun 11, 2024 · 1 comment
Open

MUI Joy UI Autocomplete crashing my app #42612

jesuschrist-immanuel opened this issue Jun 11, 2024 · 1 comment
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy status: waiting for author Issue with insufficient information

Comments

@jesuschrist-immanuel
Copy link

jesuschrist-immanuel commented Jun 11, 2024

Steps to reproduce

Link to repo: https://github.com/jesuschrist-immanuel/stack-overflow-clone

  1. Clone the repository
  2. Install all the packages necessary with npm i
  3. Run npm run dev

Current behavior

I am using MUI JoyUI's Autocomplete in a different page than my home page ("/") in my Nextjs app. Nextjs continues raising the error: Module not found: Can't resolve './dom-utils/getCompositeRect.js'.

Screenshot 2024-06-11 at 2 07 29 AM

It's coming from node_modules/@popperjs/core/lib/createPopper.js

Screenshot 2024-06-11 at 2 05 22 AM

There is also no ./modifiers directory like node_modules/@popperjs/core/lib/index.d.ts declares.

export * from "./types";
export * from "./enums";
export * from "./modifiers";
export { popperGenerator, detectOverflow, createPopper as createPopperBase } from "./createPopper";
export { createPopper } from "./popper";
export { createPopper as createPopperLite } from "./popper-lite";

There is also no ./utils directory like node_modules/@popperjs/core/lib/createPopper.d.ts declares.

import type { OptionsGeneric, Modifier, Instance, VirtualElement } from "./types";
import detectOverflow from "./utils/detectOverflow";
declare type PopperGeneratorArgs = {
    defaultModifiers?: Array<Modifier<any, any>>;
    defaultOptions?: Partial<OptionsGeneric<any>>;
};
export declare function popperGenerator(generatorOptions?: PopperGeneratorArgs): <TModifier extends Partial<Modifier<any, any>>>(reference: Element | VirtualElement, popper: HTMLElement, options?: Partial<OptionsGeneric<TModifier>>) => Instance;
export declare const createPopper: <TModifier extends Partial<Modifier<any, any>>>(reference: Element | VirtualElement, popper: HTMLElement, options?: Partial<OptionsGeneric<TModifier>>) => Instance;
export { detectOverflow };

Expected behavior

There was no error previously, and this bug has only been spotlighted in the past week. So far, Nextjs has seemed to ignore this issue.

Context

I use the Autocomplete component in only one page ("/users/all"). Even when I am not accessing the page, Nextjs continues to show this error. Again, there were no major error popups before this week. This has only become recurrent in recent days.

Your environment

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

Search keywords: joyui, autocomplete, nextjs, dom-utils, popperjs

@jesuschrist-immanuel jesuschrist-immanuel added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 11, 2024
@zannager zannager added component: autocomplete This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy labels Jun 11, 2024
@mj12albert
Copy link
Member

@jesuschrist-immanuel Your @mui/* dependencies seem out of date: https://github.com/jesuschrist-immanuel/stack-overflow-clone/blob/master/package.json#L17-L18

Could you update to the latest and try again?

@mj12albert mj12albert added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

3 participants