Skip to content

TS server crashes with @mui/icons-material v9 package #63445

@mliebold-jax

Description

@mliebold-jax

🔎 Search Terms

ts server, tsconfig.app.json, inlcudePackageJsonAutoImports

🕗 Version & Regression Information

Issue

When I install the @mui/icons-material v9 package VS Code is no longer able to initialize tsconfig.app.json. The TS server just keep crashing. If I remove the package or downgrade it to v7 it works fine. So it seems to be specific to this package and version.

I original created an issue with MUI and was pointed to a similar Issue reported here where there seems to not have been a reliable reproduction of it.

You should be able to reproduce this issue with the following steps:

  1. Create a new Vite React app using the React Typescript template
  2. Install MUI V9: pnpm add @mui/material @emotion/styled @emotion/react
  3. Install Material Icons v9: pnpm add @mui/icons-material
  4. Reload the window: tsconfig.app.json will now never finish initializing and it will keep showing an alert saying The JS/TS language service crashed 5 times in the last 5 Minutes.

If you remove the @mui/icons-material package or downgrade it to v7 it will then work fine again. Setting "js/ts.preferences.includePackageJsonAutoImports": "off" stops the infinite intialization and crashing problem, but then of course I get no auto imports.

Version Information

  • This is the behavior in every version of TypScript I tried, and I reviewed the FAQ for entries

⏯ Playground Link

No response

💻 Code

// Your code here

🙁 Actual behavior

TS server crashes when trying to initialize tsconfig.app.json which causes me to never get any auto imports or TS errors.

🙂 Expected behavior

Expected behavior is for it to initialize in a reasonable time without the TS server crashing.

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions