从angular8升级到angular 10后,我得到以下错误:
"Uncaught TypeError: Cannot read property 'document' of undefined at d3.js". 我想这可能与我在升级到angular10之前添加的plotly.js库有关。有没有人遇到过类似的错误?
发布于 2020-07-04 06:59:20
关于this github问题,当捆绑plotly.js代码中的d3.js时,这是一个错误。Angular 10删除了es5选项,使得无法正确捆绑d3.js。
最简单的解决方案是在构建项目时使用PlotlyViaCDNModule或PlotlyViaWindowModule而不捆绑它。
https://stackoverflow.com/questions/62696159
复制相似问题