angular - node_modules/@angular/platform-browser/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'.
解决方案
我通过node_modules
直接从目录中完全删除文件夹解决了这个问题。不要尝试在 中删除此文件夹,VS Code
因为它没有完全删除该文件夹。
推荐阅读
- java - 这段代码在哪里失败?两种方法之间的区别
- flutter - 如何使用scrollDirection设置gridview项目的宽度和高度:Axis.horizontal?
- python - 如何使用 itertools.groupby 将 CSV 数据转换为字典
- python - 水平合并两个 DataFrame 而不重新索引第一个
- node.js - Node JS / 生成 PDF 服务器端
- facebook - 如何使用 facebook 营销 api 创建多个广告集
- angular - 类型'可观察的
' 必须有一个返回迭代器的 '[Symbol.iterator]()' 方法 - angular - 将属性添加到对象 [Typescript] 的正确方法是什么
- flutter - 在 TextFormField Flutter 中聚焦时如何清空提示文本
- python - 在python3中查找文件