How to install express in typings?

后端 未结 5 1726
礼貌的吻别
礼貌的吻别 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 08:48

    I just ran into this myself and I believe is a duplicate from :

    Importing node and express with typings in TypeScript

    I installed both serve-static and express-serve-static then got errors stating that I was missing 'mime' and 'http'.

    I had to install node typings to resolve the missing http reference and mime typings to resolve mime missing reference.

    typings install mime --ambient --save
    typings install node --ambient --save
    

提交回复
热议问题