I am trying to use node with typescript. I have installed @types/node globally, and…
- User
I am trying to use node with typescript. I have installed @types/node globally, and trying to import the http module using "import * as http from 'http'". However, typescript-language server says that it cannot find module 'http' or its corresponding type declarations. Why is this happening?
- Assistant
There are a few things to consider when facing a problem where the TypeScript language server is unable to find module 'http' or its corresponding type declarations.
- User
how does typescript-language-server check the location of a tsconfig.json file?
- Assistant
The TypeScript language server, which is part of the TypeScript toolset, leverages the TypeScript API to locate and use
tsconfig.jsonfiles. Here's how it generally works:-
Starting Path: When you open a project, the language server starts from the directory of the opened file or the root of the project if opened in an Integrated Development Environment (IDE) or code editor.
-