TypeScript getting error TS2304: cannot find name ' require'

后端 未结 23 3216
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:39

    I've been struggling from this issue as well. I believe that this works for all release candidates aka rc but I didn't test is though. For @angular rc.2 it works well.

    1. Add core-js as npm dependency in package.json
    2. run typings install core-js --save
    3. remove all "es6-shim" occurances in your package.json. You don't need it anymore.

    Cheers!

提交回复
热议问题