./node_modules/ng2-charts/fesm5/ng2-charts.js 230:54-72 中的警告“在“@angular/core"中找不到“export 'ɵɵdefineInjectable" [英] WARNING in ./node_modules/ng2-charts/fesm5/ng2-charts.js 230:54-72 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

查看:21
本文介绍了./node_modules/ng2-charts/fesm5/ng2-charts.js 230:54-72 中的警告“在“@angular/core"中找不到“export 'ɵɵdefineInjectable"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Angular 7 应用程序中使用 ng2-charts 并有警告

I am using ng2-charts in Angular 7 app and having warning

./node_modules/ng2-charts/fesm5/ng2-charts.js 中的警告 230:54-72在‘​​@angular/core’中找不到导出‘ɵɵdefineInjectable’

WARNING in ./node_modules/ng2-charts/fesm5/ng2-charts.js 230:54-72 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

VS Code 中的错误

浏览器错误

可能是什么原因以及如何解决?

What could be the reason and how to resolve it?

推荐答案

更新:2021 年 5 月

最近我在 Angular v11 中使用了 ng2-charts@2.4.2 并且它工作正常.你可以试试最新版本

Update: May 2021

Recently I have used ng2-charts@2.4.2 in Angular v11 and it's working fine. You may try with the latest version

npm install ng2-charts@latest // it will automatically install latest version

较旧的

ng2-charts v2.2.4 有这个错误,因为很多用户报告说降级到 ng2-charts v2.2.3 是好的,直到它被修复在未来的版本中.

Older

ng2-charts v2.2.4 has this bug as lots of users are reporting that so down-grading to ng2-charts v2.2.3 is fine until it is fixed in the future releases.

npm install ng2-charts@2.2.3

这篇关于./node_modules/ng2-charts/fesm5/ng2-charts.js 230:54-72 中的警告“在“@angular/core"中找不到“export 'ɵɵdefineInjectable"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆