Code Monkey home page Code Monkey logo

Comments (8)

AlCo2 avatar AlCo2 commented on May 1, 2024 3

@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.

Jasermon avatar Jasermon commented on May 1, 2024 3

same issue

image

Prop suggest works fine btw

image

image

image

from material-ui.

thucne avatar thucne commented on May 1, 2024 1

I had the same issue (@mui/material ^5.13.4) and it was okay before, I changed nothing though

from material-ui.

DysektAI avatar DysektAI commented on May 1, 2024

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...

image

But if I try to import a icon from the icon package it works fine:

image

But when trying to even do a simple autocomplete on the import itself:

image

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:

image

image

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.

DysektAI avatar DysektAI commented on May 1, 2024

@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.

thucne avatar thucne commented on May 1, 2024

Looks like the issue came from VS Code latest version, I downgraded it to 1.87.2 and my suggestions are back!

image

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

image

from material-ui.

Jasermon avatar Jasermon commented on May 1, 2024

Looks like the issue came from VS Code latest version, I downgraded it to 1.87.2 and my suggestions are back!

image

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

image

This worked for me too.

image

from material-ui.

DysektAI avatar DysektAI commented on May 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.