首页 > 解决方案 > node_modules/@angular/platform-b​​rowser/src/browser/browser_adapter.d.ts 中的错误

问题描述

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

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'.

标签: angularruntime-errorangular6

解决方案


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


推荐阅读