Continuing with weird errors you might encounter in JavaScript world, I have another one: Visual Studio Code IntelliSense loading infinitely 😀 Solution included, of course!
The symptoms of this issue are putting your mouse on something where you’d expect the IntelliSense guidelines, but instead you only see the “Loading…” text.
In this short article, I’m sharing the reason of this issue and my way of fixing it.
How VS Code Infinite IntelliSense Loading Looks Like
This is what I struggled with:
As you can see, I didn’t get any IntelliSense while hovering my mouse on various elements in the editor.
A similar thing happened when I tried to use Go to References
(or Shift
+ F12
on Windows) for any object:
As you can see, the loading bar at the top of VS Code was showing progress infinitely.
Let’s now see how to fix this annoying issue 😉
Fixing Visual Studio Code IntelliSense Loading Infinitely
After quite long investigation, I finally found the reason. It turned out that sometimes your Visual Studio Code might be using a different TypeScript version than your workspace uses. In my case, it was exactly the cause of the infinite loading problem 🧐
In order to fix it, use TypeScript: Select TypeScript Version...
command. You can access commands with Ctrl + Shift + P
on Windows or ⇧⌘P
on Mac:
Select this command and tell Visual Studio Code to use the workspace version of TypeScript:
As you can see on the screenshot above, in my case the VS Code’s TypeScript version was 4.8.2
, while the workspace version was 4.8.3
. Changing it to use the newer, workspace version solved the problem. Visual Studio Code IntelliSense loading infinitely issue was gone 🎉
If it doesn’t work straightaway, you might need restarting your VS Code editor.
I hope that worked for you and saved you some hours of debugging and exploring StackOverflow 🙂
OMG this SAVED MY LIFE!! thank you
I’m happy to hear that! 🙂
This not work for me 🙁
Didn’t work for me either. The only thing that works, and something I have to do several times per day, is close and reopen VSCode.
That sucks 😐
Tired a thousand things and only this managed to solve it, thank you!!!!
happy to hear that, Adri! 🙂
Thank you so much! You saved my project.
Struggled with this on a project for a week! For me, the culprit was the Intellisense was scanning files not related to the project. Specifically, I had some code that was pulling data from the AWSCLI and so I didn’t have to inspect the results every time, I saved it as a json file into a junk folder within my project folder. Then to compound the problem I used gron to make it an easy-to-read .js file. So picture two giant javascripty-looking files in the project folder. These gave ‘Intellisense Loading’ a reason to lock at 100% cpu and never finish. After exiting VSCode I would have to kill the pids of these hung processes.
Ultimately I moved my scratch .js and .json files into a hidden folder (this is linux so I just put a . in front of the foldername), closed VSCode, killed the pids of the hung processes one more time, and then restarted VSCode.
wow, thanks for sharing that Pat! May be helpful to many people out there 🙂
This didn’t worked for me. But deleteing the project and cloning again fixed the issue – it was something WSL relatef.
good to know, thanks for sharing!
I got here to tell you guys what was the issue and the fix for me.
Open your tsconfig.json file. On the bottom right there is “JSON with Comments” with {} icon before it. Click the {} icon. It was showing multiple formatters – that caused the parsing error of this file for some reason. Chose the one that’s not Prettier and restart VSCode. This fixed the issue for me
thanks for sharing!
Hi @Dawid Sibiński
While I am working with Terraform script in VS Code, when I Hover on any Terraform script filed it should show me that particular data type of the field, but it is loading infinitely, can you please me on this issue
Hi @Dawid Sibiński
I facing similar issues for terraform Script,
While I am working with Terraform script in VS Code, when I Hover on any Terraform script filed it should show me that particular data type of the field, but it is loading infinitely, can you please me on this issue
I have no specific advice regarding Terraform, I guess you need to do some trial and errors yourself.