Closed devamondos closed 6 years ago
I have same issue.
Any chance we can get an update on whether this will be looked at? I have re-tried the upgrade and the issue still persists. If this is blocking me for much longer then I will have to change.
@shaneamondos
Could you provide your ngx-echarts
version number? Did you upgrade ngx-echarts for Angular 6?
ngx-echarts: 2.3.1 echarts: 4.1.0 @types/echarts: 4.1.1
Sorry I've only just noticed that ngx-echarts wasn't the most recent one. I was looking at the echarts version.
I have now downloaded 4.0.0 for ngx-echarts but I now get a different error on build and found that someone already raised this issue #143. The solution for him was to set the baseUrl in his tsconfig file but this is already set in mine and I am still getting this issue.
ERROR in ./node_modules/ngx-echarts/fesm5/ngx-echarts.js Module not found: Error: Can't resolve 'C:\PROJECT_LOCATION\src\node_modules\echarts\dist\echarts.min.js' in 'C:\PROJECT_LOCATION\node_modules\ngx-echarts\fesm5'
Seems like its going into the src directory when it don't want it to
@shaneamondos
baseUrl
in your tsconfig.json?path
for echarts in your tsconfig.json?{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
],
"baseUrl": "./",
"paths": {
"echarts": [
"node_modules/echarts/dist/echarts.min.js"
]
},
"module": "es2015"
}
}
Update!: So I managed to fix it by updating the baseUrl to 'src' and the echarts path so it started with '../'. I can't really wrap my head around why it now works that way as my tsconfig file is in the same directory as my node_modules but ohh well it works. Thanks for your help.
Hello, i have the same problem.
ngx-echarts: 2.3.1 echarts: 4.2.0
Note: I add the correct address (echart in tsconfig.json) but it says it's wrong (the direction). "baseUrl": "./", "paths": { "echarts": [ "./node_modules/echarts/dist/echarts.min.js" ] }
ERROR in src/groups/groups.ts(19,30): error TS2306: File '......../webapp/node_modules/echarts/dist/echarts.min.js' is not a module. src/groups/groups.ts(21,25): error TS2306: File '....../webapp/node_modules/echarts/dist/echarts.min.js' is not a module.
Any ideas? Thanks
rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__.Observable.of is not a function at ChangeFilter.push../node_modules/ngx-echarts/ngx-echarts.es5.js.ChangeFilter.notEmpty (ngx-echarts.es5.js:30) at NgxEchartsDirective.push../node_modules/ngx-echarts/ngx-echarts.es5.js.NgxEchartsDirective.ngOnChanges (ngx-echarts.es5.js:113) at checkAndUpdateDirectiveInline (core.js:9239) at checkAndUpdateNodeInline (core.js:10507) at checkAndUpdateNode (core.js:10469) at debugCheckAndUpdateNode (core.js:11102) at debugCheckDirectivesFn (core.js:11062) at Object.eval [as updateDirectives] (DataDonutComponent.html:2) at Object.debugUpdateDirectives [as updateDirectives] (core.js:11054) at checkAndUpdateView (core.js:10451)