angular4アプリをangular5にアップデートしていますが、ng testを実行するとこのエラーが発生します。私はangular4でこれを取得しなかったので、インストールプロセスと関係があるように感じます。これが起こっている理由として任意の考えを大幅angular5でng testを実行すると、なぜこのエラーが発生しますか?
...
s/@angular/platform-browser/src/dom/dom_adapter.d.ts(80,58): error TS2304: Cannot find name 'HTMLStyleElement'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(84,44): error TS2304: Cannot find name 'Node'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(85,26): error TS2304: Cannot find name 'Node'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(85,33): error TS2304: Cannot find name 'Node'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(86,66): error TS2304: Cannot find name 'HTMLElement'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(87,64): error TS2304: Cannot find name 'HTMLElement'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(107,36): error TS2304: Cannot find name 'HTMLDocument'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(108,36): error TS2304: Cannot find name 'Document'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(110,28): error TS2304: Cannot find name 'Document'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(111,28): error TS2304: Cannot find name 'Document'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(119,34): error TS2304: Cannot find name 'Node'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(119,41): error TS2304: Cannot find name 'Node'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(120,30): error TS2304: Cannot find name 'Node'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(120,37): error TS2304: Cannot find name 'Node'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(126,40): error TS2304: Cannot find name 'Document'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(127,28): error TS2304: Cannot find name 'History'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(128,29): error TS2304: Cannot find name 'Location'.
node_modules/@angular/platform-browser/src/dom/dom_adapter.d.ts(129,31): error TS2304: Cannot find name 'Document'.
node_modules/@angular/platform-browser/src/dom/dom_tokens.d.ts(10,47): error TS2304: Cannot find name 'Document'.
node_modules/@angular/platform-browser/src/dom/events/dom_events.d.ts(14,31): error TS2304: Cannot find name 'HTMLElement'.
node_modules/@angular/platform-browser/src/dom/events/event_manager.d.ts(21,31): error TS2304: Cannot find name 'HTMLElement'.
node_modules/@angular/platform-browser/src/dom/events/event_manager.d.ts(30,40): error TS2304: Cannot find name 'HTMLElement'.
node_modules/@angular/platform-browser/src/dom/events/hammer_gestures.d.ts(29,26): error TS2304: Cannot find name 'HTMLElement'.
node_modules/@angular/platform-browser/src/dom/events/hammer_gestures.d.ts(35,31): error TS2304: Cannot find name 'HTMLElement'.
node_modules/@angular/platform-browser/src/dom/events/key_events.d.ts(16,31): error TS2304: Cannot find name 'HTMLElement'.
node_modules/@angular/platform-browser/src/dom/events/key_events.d.ts(20,35): error TS2304: Cannot find name 'KeyboardEvent'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(20,23): error TS2304: Cannot find name 'Node'.
node_modules/@angular/platform-browser/src/dom/shared_styles_host.d.ts(21,26): error TS2304: Cannot find name 'Node'.
私ts.configファイルはこの
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types/"
],
"lib": [
"dom",
"es2016"
]
},
"types": [
"node",
"jasmine",
"core-js"
]
}
のように見えます
をいただければ幸い私はまた、タイピングをインストールしようとしています。そして私はそれを得続けます。この原因は何ですか?
インストールされているすべての種類を含める:ここ
は一例ですか? – Taki
@タキ私はtypescriptを使用しています。2.4.2 – Dan