Solution to the problem that the node/express project under webstorm cannot recognize the built-in api

Insert image description here

webstormAs shown in the picture, I have been writing projects for a long time express, and the IDE always prompts unresolved, and commandthe source code cannot be accessed by pressing keys + clicking, but it does not affect the operation and use . It may be related to ts refactoring. I am a novice and don’t understand. . I will record this as a memo.

Solution

npm i  @types/node  @types/express -D

Effect

Insert image description here
All nodeand expressAPIs can be recognized and with code prompts , you can also click to access the source code. The whole world is purified...

Guess you like

Origin blog.csdn.net/s18438610353/article/details/125769873