[英]Ionic3 Highcharts-More import Error --JsAllow Not Set
I try to import Highcharts-more like this: 我尝试导入Highcharts-更像这样:
import Highmore from '../../node_modules/highcharts/highcharts-more';
then im getting the following Error: 然后即时通讯收到以下错误:
Module '../../node_modules/highcharts/highcharts-more' was resolved to 'C:/Users/.../node_modules/highcharts/highcharts-more.js', but '--allowJs' is not set.
So I go into my tsconfig.json and add allowJs to my settings: 所以我进入tsconfig.json并将allowJs添加到我的设置中:
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5"
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
After that Im getting a new Error: 之后,我收到一个新的错误:
Cannot write file 'C:/Users/../node_modules/highcharts/highcharts-more.js' because it would overwrite input file.
I need highcharts-more in my whole Project and I couldnt find another way to import it. 我在整个项目中需要更多图表,我找不到其他导入方法。 Please help
请帮忙
Use the same syntax as it's shown in this doc ( Typescript section): https://www.npmjs.com/package/highcharts 使用与本文档(“ 打字稿”部分)所示相同的语法: https : //www.npmjs.com/package/highcharts
The example is done for the exporting module - highcharts-more module should be imported analogically. 该示例已针对导出模块完成-应该以类似方式导入highcharts-more模块。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.