Comments (8)
@lyricalcasanova we got exactly the same issue, just 3 days ago everything was working fine, and I am really sure I never changed nothing in my settings.
from material-ui.
same issue
Prop suggest works fine btw
from material-ui.
I had the same issue (@mui/material ^5.13.4) and it was okay before, I changed nothing though
from material-ui.
UPDATE: This seems to be a issue with VS Code Version 1.88 and is not present in Version 1.87.2
Thanks to @thucne for providing a workaround 👍
Having this same issue right now going insane trying to figure out if I broke something in VS Code or if somehow @mui/material is broken somehow I cant do any auto completion as I was before recent using for instance <Box (Auto complete to add import and finish the component but switching the file extension to tsx fixes it fully but JS and JSX is fully broken have uninstalled reinstalled a bunch of plugins attempted to switch the layout of my config file and many more things for instance here is the issue I have below with the element...
But if I try to import a icon from the icon package it works fine:
But when trying to even do a simple autocomplete on the import itself:
Not sure how this happened I tried basically everything I could find to fix this and I dont think I made it any better closest I got was simply changing to .tsx instead which resulted in the same functionality as the OP:
Edit: For clarity the imports still 100% work if defined manually it's just really helpful to have the auto completion for simplicity especially after using it for almost a year now so if I had to guess it seems like vscode simply is just not finding the modules for some reason in JS or JSX I assumed this was an issue with my setup but reverted all changes back to the working version and same results with it?
UPDATE: This seems to be a issue with VS Code Version 1.88 and is not present in Version 1.87.2
Thanks to @thucne for providing a workaround 👍
from material-ui.
@AlCo2 You mentioned in your original post you somehow got around this issue by doing the following?
I created a .tsx file and its worked fine and its showed me the suggestion of <Button but when I create .jsx file, I don't get no suggestion, I deleted all the typescript files from the MUI module, then I started getting suggestion in javascript file, is this issue related to vsode or the problem is with the typescript files in mui.
Can you maybe elaborate on what which TS files you removed?
I attempted to recreate this by just deleting all the TS files in ONLY the Box component and the Button component directories but I had no different result?
from material-ui.
Looks like the issue came from VS Code latest version, I downgraded it to 1.87.2 and my suggestions are back!
First, you need to disable the auto-update from VS Code, until the issue is resolved, to prevent the downgrade not get updated again once you restart the IDE.
File > Preferences > Settings
search for update
, change update mode to none
Then, to downgrade, you can download and install from the website, it will override the current version:
https://code.visualstudio.com/updates/v1_87
from material-ui.
Looks like the issue came from VS Code latest version, I downgraded it to 1.87.2 and my suggestions are back!
First, you need to disable the auto-update from VS Code, until the issue is resolved, to prevent the downgrade not get updated again once you restart the IDE.
File > Preferences > Settings
search forupdate
, change update mode to noneThen, to downgrade, you can download and install from the website, it will override the current version: https://code.visualstudio.com/updates/v1_87
This worked for me too.
from material-ui.
Edit: Found the actual issue for this and the options microsoft/TypeScript#58113 (comment)
@AlCo2 I provided an updated / edited version of your original post to copy and paste so others find the solution easily. Optionally I would suggest changing the title of this issue to: "VS Code v1.88 Breaks JS/JSX Import Suggestions (Workaround)"
Edited/Updated OP Raw
**UPDATE: This seems to be a issue with VS Code Version 1.88 and is not present in Version 1.87.2
https://github.com/microsoft/TypeScript/issues/58113#issuecomment-2048607368** 👍
### Steps to reproduce
JS / JSX (Auto imports broken)
<img alt="Capture" width="960" src="https://private-user-images.githubusercontent.com/109082926/320297815-a77a163b-f66c-4297-a3d5-5cd5a3a2ae00.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI3ODMwMjIsIm5iZiI6MTcxMjc4MjcyMiwicGF0aCI6Ii8xMDkwODI5MjYvMzIwMjk3ODE1LWE3N2ExNjNiLWY2NmMtNDI5Ny1hM2Q1LTVjZDVhM2EyYWUwMC5QTkc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQxMFQyMDU4NDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mMGYyMGVlNjRlM2ZkZTQxODNkZDA0MGUxYTA3NGQwMmJkOWE1ODg2MDZhY2IzN2E4MTg3MDE3ZDE3MTJmYTI2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.T9vokGk6W1BTnH1yBSl4bYzK609_Pxx2lnAzfNELdY8">
TS / TSX (Works as expected)
<img alt="Capture2" width="960" src="https://private-user-images.githubusercontent.com/109082926/320297823-923bac80-6e03-4763-96d5-c4f30d10b1e0.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI3ODMwMjIsIm5iZiI6MTcxMjc4MjcyMiwicGF0aCI6Ii8xMDkwODI5MjYvMzIwMjk3ODIzLTkyM2JhYzgwLTZlMDMtNDc2My05NmQ1LWM0ZjMwZDEwYjFlMC5QTkc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQxMFQyMDU4NDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNWZhNjMxZGFmZGZjYjgyMTUzODY2NjlhZWFmNWFjMjcwOGQwYzQ2NDExN2Y4NTU3ZTQ1ZjJhZTg5OWVlMzVkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.CcxctFyakat8o_JUdDg4ZAjwDHJhbepRb3EuLs7L_hE">
### Current behavior
when trying to use components from MUI I used to get suggestion to auto import the component, until yesterday, I couldn't get any suggestion when working with `*.js` or `*.jsx` files.
### Expected behavior
when typing `<Button` its should show a suggestion to auto import the component.
### Context
I just started facing this problem yesterday, it was working fine, I created a `.tsx` file and it worked fine and showed the suggestion for `<Button` but in *.js or *.jsx files, I don't get any suggestions.
**UPDATE: This seems to be a issue with VS Code Version 1.88 and is not present in Version 1.87.2
https://github.com/microsoft/TypeScript/issues/58113#issuecomment-2048607368** 👍
from material-ui.
Related Issues (20)
- [material-ui][Tabs] Keyboard navigation does not work with unselected tabs HOT 4
- [material-ui][Autocomplete] Does not properly select options when they are objects and value is controlled HOT 2
- [joy-ui][Input] Using Input with react-imask HOT 3
- [material-ui] VSCode Auto Import Problem HOT 2
- @mui/styles has inconsistent react types
- [material-ui][FormControl] Typescript error: Cannot access `e.target.checked` HOT 2
- [material-ui][nextjs] useLocalStorage for theme name causes theme styles to get out of sync HOT 1
- [docs-infra] Add search bar feature HOT 5
- [icons] Add the "Id Card" icon HOT 6
- [pigment-css] Mistransforms template literals HOT 1
- [material-ui][RadioGroup] Label blinks when clicking the radio label HOT 1
- [material-ui][docs] Convert the "all components" images to CSS
- [docs] Migrating from v4 to v5 - Missing details in documentation
- [material-ui][nextjs] 14.2.0 crashes with Error: Element type is invalid HOT 3
- [website] Improve products navbar HOT 1
- [material-ui] Next.js 14 with NX monorepo build fails on PonyfillGlobal HOT 3
- [docs-infra] Dark mode not persisting after switching from light mode HOT 8
- Module not found: Error: Can't resolve '@mui/base/className' in '/app/node_modules/********/ui-toolkit/node_modules/@mui/material/utils' HOT 1
- [joy-ui][Button] The user can see the text by highlighting when loading is true
- [dataGrid v7]: & .MuiDataGrid-columnHeader: first-of-type cannot effect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-ui.