简体   繁体   English

Codekit无法在angular v5项目中编译main.ts和app.component.spec.ts

[英]Codekit fails to compile main.ts and app.component.spec.ts in angular v5 project

I am running Angular 5.1.0 through terminal and have a folder set up for sass in /src/scss, I am using codekit to compile the sass. 我正在通过终端运行Angular 5.1.0,并在/ src / scss中为sass设置了一个文件夹,我正在使用codekit来编译sass。

Everything was running fine and was compiling with no errors until the last couple of saves, now when I save my css codekit tells me that main.ts and app.component.spec.ts failed to compile. 直到最后几次保存,一切都运行良好并且没有错误编译,现在当我保存CSS代码包时,我告诉我main.ts和app.component.spec.ts编译失败。

Is this a known issue with running codekit and angular together? 这是一起运行Codekit和angular的已知问题吗? If not, is there an easy way to fix this, it's really bugging me, can I choose to ignore these files through codekit and continue as normal? 如果没有,是否有解决此问题的简便方法,这确实使我烦恼,我是否可以选择通过Codekit忽略这些文件并继续正常运行?

Codekit statements below: 下面的Codekit语句:

/src/app/app.component.spec.ts /src/app/app.component.spec.ts

TypeScript: node_modules/@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(12,32): error TS2304: Cannot find name 'Iterable'. TypeScript:node_modules/@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(12,32):错误TS2304:找不到名称“ Iterable”。 node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,16): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,16):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(32,16): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(32,16):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/change_detection/differs/iterable_differs.d.ts(14,48): error TS2304: Cannot find name 'Iterable'. node_modules/@angular/core/src/change_detection/differs/iterable_differs.d.ts(14,48):错误TS2304:找不到名称“ Iterable”。 node_modules/@angular/core/src/change_detection/differs/keyvalue_differs.d.ts(22,18): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/change_detection/differs/keyvalue_differs.d.ts(22,18):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/di/reflective_provider.d.ts(87,123): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/di/reflective_provider.d.ts(87,123):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/di/reflective_provider.d.ts(87,165): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/di/reflective_provider.d.ts(87,165):错误TS2304:找不到名称“地图”。 node_modules/rxjs/Observable.d.ts(58,60): error TS2693: 'Promise' only refers to a type, but is being used as a value here. node_modules / rxjs / Observable.d.ts(58,60):错误TS2693:“ Promise”仅引用一种类型,但在此处用作值。 node_modules/rxjs/Observable.d.ts(73,59): error TS2693: 'Promise' only refers to a type, but is being used as a value here. node_modules / rxjs / Observable.d.ts(73,59):错误TS2693:“ Promise”仅引用一种类型,但在此处用作值。

/src/main.ts /src/main.ts

TypeScript: node_modules/@angular/common/src/directives/ng_class.d.ts(48,34): error TS2304: Cannot find name 'Set'. 打字稿:node_modules/@angular/common/src/directives/ng_class.d.ts(48,34):错误TS2304:找不到名称“设置”。 node_modules/@angular/compiler/src/aot/compiler.d.ts(71,32): error TS2304: Cannot find name 'Map'. node_modules/@angular/compiler/src/aot/compiler.d.ts(71,32):错误TS2304:找不到名称“地图”。 node_modules/@angular/compiler/src/compile_metadata.d.ts(322,20): error TS2304: Cannot find name 'Set'. node_modules/@angular/compiler/src/compile_metadata.d.ts(322,20):错误TS2304:找不到名称“设置”。 node_modules/@angular/compiler/src/compile_metadata.d.ts(324,28): error TS2304: Cannot find name 'Set'. node_modules/@angular/compiler/src/compile_metadata.d.ts(324,28):错误TS2304:找不到名称“设置”。 node_modules/@angular/compiler/src/compile_metadata.d.ts(326,15): error TS2304: Cannot find name 'Set'. node_modules/@angular/compiler/src/compile_metadata.d.ts(326,15):错误TS2304:找不到名称“设置”。 node_modules/@angular/compiler/src/compile_metadata.d.ts(328,23): error TS2304: Cannot find name 'Set'. node_modules/@angular/compiler/src/compile_metadata.d.ts(328,23):错误TS2304:找不到名称“设置”。 node_modules/@angular/compiler/src/compile_metadata.d.ts(330,17): error TS2304: Cannot find name 'Set'. node_modules/@angular/compiler/src/compile_metadata.d.ts(330,17):错误TS2304:找不到名称“设置”。 node_modules/@angular/compiler/src/compile_metadata.d.ts(332,25): error TS2304: Cannot find name 'Set'. node_modules/@angular/compiler/src/compile_metadata.d.ts(332,25):错误TS2304:找不到名称“设置”。 node_modules/@angular/compiler/src/output/output_ast.d.ts(514,63): error TS2304: Cannot find name 'Set'. node_modules/@angular/compiler/src/output/output_ast.d.ts(514,63):错误TS2304:找不到名称“设置”。 node_modules/@angular/compiler/src/view_compiler/type_check_compiler.d.ts(29,161): error TS2304: Cannot find name 'Map'. node_modules/@angular/compiler/src/view_compiler/type_check_compiler.d.ts(29,161):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(12,32): error TS2304: Cannot find name 'Iterable'. node_modules/@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(12,32):错误TS2304:找不到名称“ Iterable”。 node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,16): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,16):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(32,16): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(32,16):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/change_detection/differs/iterable_differs.d.ts(14,48): error TS2304: Cannot find name 'Iterable'. node_modules/@angular/core/src/change_detection/differs/iterable_differs.d.ts(14,48):错误TS2304:找不到名称“ Iterable”。 node_modules/@angular/core/src/change_detection/differs/keyvalue_differs.d.ts(22,18): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/change_detection/differs/keyvalue_differs.d.ts(22,18):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/di/reflective_provider.d.ts(87,123): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/di/reflective_provider.d.ts(87,123):错误TS2304:找不到名称“地图”。 node_modules/@angular/core/src/di/reflective_provider.d.ts(87,165): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/di/reflective_provider.d.ts(87,165):错误TS2304:找不到名称“地图”。 node_modules/@angular/platform-browser/src/browser/browser_adapter.d.ts(79,33): error TS2304: Cannot find name 'Map'. node_modules/@angular/platform-b​​rowser/src/browser/browser_adapter.d.ts(79,33):错误TS2304:找不到名称“地图”。 node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(97,42): error TS2304: Cannot find name 'Map'. node_modules/@angular/platform-b​​rowser/src/dom/dom_adapter.d.ts(97,42):错误TS2304:找不到名称“地图”。 node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(11,30): error TS2304: Cannot find name 'Set'. node_modules/@angular/platform-b​​rowser/src/dom/shared_styles_host.d.ts(11,30):错误TS2304:找不到名称“设置”。 node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(22,30): error TS2304: Cannot find name 'Set'. node_modules/@angular/platform-b​​rowser/src/dom/shared_styles_host.d.ts(22,30):错误TS2304:找不到名称“设置”。 node_modules/rxjs/Observable.d.ts(58,60): error TS2693: 'Promise' only refers to a type, but is being used as a value here. node_modules / rxjs / Observable.d.ts(58,60):错误TS2693:“ Promise”仅引用一种类型,但在此处用作值。 node_modules/rxjs/Observable.d.ts(73,59): error TS2693: 'Promise' only refers to a type, but is being used as a value here. node_modules / rxjs / Observable.d.ts(73,59):错误TS2693:“ Promise”仅引用一种类型,但在此处用作值。

Codekit附带的.ts输出设置设置为es3和react.js,您必须运行项目并手动更新设置以反映项目类型,在我的情况下,这是“ ECMAScript目标版本:ES6”和“ JSX处理:保留”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM