我将使用 @amcharts/amcharts4@4.3.5 的应用程序更新为 Angular 8,但现在编译时遇到问题。
已将 amcharts 更新至版本 4.4.10。但问题仍然存在。
ERROR in ./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js 68:24
Module parse failed: Unexpected token (68:24)
You may need an appropriate loader to handle this file type.
| switch (_a.label) {
| case 0: return [4 /*yield*/, Promise.all([
> import(/* webpackChunkName: "pdfmake" */ "pdfmake/build/pdfmake.js"),
| import(/* webpackChunkName: "pdfmake" */ "../../pdfmake/vfs_fonts")
| ])];
最佳答案
这个解决方法对我有用:
npm install --save acorn@6.1.1
npm dedupe
<小时/>
问题出在 NPM 方面,请在此处检查:
https://github.com/amcharts/amcharts4/issues/1002
在 AmCharts 文档中找到了这一点,这使我找到了上述解决方法:
https://www.amcharts.com/docs/v4/getting-started/integrations/using-webpack/
关于angular - 使用 amcharts4 编译 Angular 8 CLI 项目时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56480480/