You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've followed the steps in the readme exactly, I've tried re-installing with npm, manually adding the @types module and using yarn instead of npm.
I'm using Angular 8, Node 12 and Npm 6. It seems no matter what I do I get the following error:
ERROR in node_modules/zingchart-angular/lib/zingchart-angular.component.d.ts(3,8): error TS1192: Module '"[...obfuscated...]/node_modules/@types/zingchart/index"' has no default export.
Line 3 in question, which shows a compiler error, is import zingchart from 'zingchart'; and points to the @types file, same as the above error.
I've tried various fixes to handle this, including writing my own .d.ts file what I understand to be a default export, but to no avail. I've also tried using different styles of imports (i.e. import * as ZingchartAngularModule or import { ZingchartAngularModule })
I'm not a seasoned Angular dev, so I may just need to get more familiar with how to resolve these errors in general, and how the structure of declared exports works, but this still seems like a gap in the installation instructions. zingchart-angular appears to have an ambiguous dependency on the zingchart module. Though the core of the issue appears to be in the @types module, and which yarn installs automatically, but npm does not. The fundamental issue is evading me at the moment, and I'm not sure how to proceed.
Hi @503geek , I actually did not see that @types accepted my pull request for the type definition file! It was stuck in review for weeks due to the sheer size of it. I'll look into updating that. In the meantime, I released this package with a local typedef file in src/. Can you see if that works for you?
Thanks for the reply Mike. I still see zingchart-angular@0.0.6 as the latest. I tried reinstalling, same error, then tried removing the what might've been the old @types folder and reinstalling, same error. I have a feeling I'm trying to update/install the wrong package.
Activity
503geek commentedon Feb 26, 2020
FWIW this is using the free MBD Angular Admin Dashboard as a starter - I tried it using the MDB Vue starter and was able to get it working.
mike-schultz commentedon Feb 27, 2020
Hi @503geek , I actually did not see that @types accepted my pull request for the type definition file! It was stuck in review for weeks due to the sheer size of it. I'll look into updating that. In the meantime, I released this package with a local typedef file in src/. Can you see if that works for you?
503geek commentedon Mar 1, 2020
Thanks for the reply Mike. I still see
zingchart-angular@0.0.6as the latest. I tried reinstalling, same error, then tried removing the what might've been the old @types folder and reinstalling, same error. I have a feeling I'm trying to update/install the wrong package.PatrykTucki commentedon May 17, 2020
@mike-schultz please have a look on #2.
jeanettephung commentedon Aug 21, 2023
Latest version of
@types/zingchartresolves this issue