ng2

Cannot find name 'require

2016-10-07  本文已影响321人  n37r06u3
Paste_Image.png

https://github.com/angular/angular-cli/issues/2221

http://stackoverflow.com/questions/31173738/typescript-getting-error-ts2304-cannot-find-name-require

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/requirejs/require.d.ts

解决
npm install @types/node --save-dev

add tsconfig.json
{ "compilerOptions": { "types": ["node"] }}

上一篇 下一篇

猜你喜欢

热点阅读