How To Fix Visual Studio Code IntelliSense Loading Infinitely

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:

Visual Studio Code IntelliSense Loading Infinitely - a gif animation

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:

Visual Studio Code IntelliSense Loading Infinitely for Go to References - a gif animation

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:

Visual Studio Code: command palette view, "TypeScript: Select TypeScript Version" command

Select this command and tell Visual Studio Code to use the workspace version of TypeScript:

Visual Studio Code: command palette view, "TypeScript: Select TypeScript Version" command, telling VS Code to use 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 🙂

GET A FREE GUIDE 🎁

16 STEPS TO BECOME
.NET FULL STACK WEB DEVELOPER
IN 2024

After you sign up, I may be sending you some emails with additional free content from time to time.
No spam, only awesome stuff

.NET full stack web developer & digital nomad
3.1 7 votes
Article Rating
Subscribe
Notify of
guest
20 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Code52
Code52
2 years ago

OMG this SAVED MY LIFE!! thank you

Felipe Mateus
Felipe Mateus
1 year ago

This not work for me 🙁

Kervin
Kervin
12 hours ago
Reply to  Felipe Mateus

You may need to restart the vscode

Brian
Brian
1 year ago

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.

Adri
Adri
1 year ago

Tired a thousand things and only this managed to solve it, thank you!!!!

Veselin
Veselin
1 year ago

Thank you so much! You saved my project.

Pat Piccolo
Pat Piccolo
11 months ago

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.

snify
snify
5 months ago

This didn’t worked for me. But deleteing the project and cloning again fixed the issue – it was something WSL relatef.

blez
blez
4 months ago

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

Krishna
Krishna
1 month ago

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

Krishna
Krishna
1 month ago

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

Kervin
Kervin
12 hours ago

Thanks man, you saved my life