Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code is not sugging imports from inside the node_modules

I am experiencing issues when using "V.S. Code". All of my settings were deleted (or that is the way it seems). I reinstalled V.S. Code, but now I cannot get auto imports to work.

For example:

When I write useEffect, I expect VS Code to suggest an import for it from the node modules, however, its not suggesting it.

enter image description here


        How can this issue be fixed?
like image 321
Artemis Avatar asked Oct 27 '25 23:10

Artemis


2 Answers

Okay, I found the answer. The problem was that by default the extension "TypeScript and JavaScript Language Features" was disabled. After enabling now everything work

https://i.sstatic.net/mGp4H.png

like image 166
Artemis Avatar answered Oct 30 '25 15:10

Artemis


You might need to add this line to your VS Code "settings.json" file:

{
  "typescript.tsdk": "./node_modules/typescript/lib"
}
like image 33
Ihab Avatar answered Oct 30 '25 13:10

Ihab