How to install express in typings?

后端 未结 5 1791
礼貌的吻别
礼貌的吻别 2021-02-07 08:23

I am trying to use expressjs in my app.

After installing it using typings install express --ambient --save, I run tsc, but I get two errors:

5条回答
  •  自闭症患者
    2021-02-07 09:04

    I'v run into this issue myself and found out you also have to have the actual nodeJS module installed as well as its typing.

    So when you have correclty configured typescript and your project, you need ot install both the nodeJS dependency as well as the @types dependecy.

    npm install express --save

    npm install --save @types/express

提交回复
热议问题