'require' keyword not being recognized by webstorm

后端 未结 5 1885
春和景丽
春和景丽 2021-02-01 03:15

I\'m using WebStorm as the IDE.

Here\'s my folder structure and express.js insalled:

\"ente

5条回答
  •  执笔经年
    2021-02-01 04:09

    Update

    On the new Webstorm versions, just going above error and clicking in More Actions... (or ALT+ENTER) and selecting Enable Node.js coding assistance will solve this.


    To solve these problems on the new Webstorm versions, you need to enable the Coding assistance for Node.js.

    To do this, go on the Settings > Languages & Frameworks > Node.js and NPM and click on the Coding assistance for Node.js option, and then click OK to save:

    This will solve all Node.js unresolved variables and functions.

提交回复
热议问题