TypeScript getting error TS2304: cannot find name ' require'

后端 未结 23 2990
Happy的楠姐
Happy的楠姐 2020-11-22 06:00

I am trying to get my first TypeScript and DefinitelyTyped Node.js application up and running, and running into some errors.

I am getting the error \"TS2304: Cannot

23条回答
  •  滥情空心
    2020-11-22 06:47

    I couldn't get the 'require' error to go away by using any of the tricks above.

    But I found out that the issue was that my TypeScript tools for Visual Studio where an old version (1.8.6.0) and the latest version as of today is (2.0.6.0).

    You can download the latest version of the tools from:

    TypeScript for Visual Studio 2015

提交回复
热议问题