You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Angular 8中ng-idle/ng-keepalive兼容版本咨询及报错解决

Angular 8 兼容的 ng-idle/ng-keepalive 版本解决方案
  • 安装8.x系列版本即可适配Angular 8,执行以下命令:
    npm install @ng-idle/core@8.0.0 @ng-idle/keepalive@8.0.0 --save
    
  • 报错原因:高版本的@ng-idle依赖Angular 9及以上版本的API(如RxJS新操作符、Angular核心包特性),Angular 8无法兼容这些特性,从而触发Uncaught (in promise): TypeError: Object(...) is not a function这类兼容性错误。
  • 注意事项:安装时需保证@ng-idle/core和@ng-idle/keepalive版本完全一致,避免版本不匹配引发额外问题。

内容的提问来源于stack exchange,提问作者Salvi Rawat

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 22:34:50