node_modules/@angular/platform-b​​rowser/src/browser/browser_adapter.d.ts中的错误

时间:2018-06-06 12:41:40

标签: angular runtime-error angular6

我收到此错误,并且不知道此错误的确切原因

ERROR in node_modules/@angular/platform-browser/src/browser/browser_adapter.d.ts(62,5): 

error TS2416: Property 'createScriptTag' in type 'BrowserDomAdapter' 
is not assignable to the same property in base type 'GenericBrowserDomAdapter'.

Type '(attrName: string, attrValue: string, doc?: Document) => 
HTMLScriptElement' is not assignable to type 
'(attrName: string, attrValue: string, doc?: any) => HTMLInputElement'.

Type 'HTMLScriptElement' is not assignable to type 'HTMLInputElement'.
Property 'accept' is missing in type 'HTMLScriptElement'.

1 个答案:

答案 0 :(得分:0)

我通过直接从目录中删除node_modules文件夹来解决此问题。不要尝试在VS Code中删除此文件夹,因为它没有完全删除该文件夹。