Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has no default export #1

Closed
503geek opened this issue Feb 26, 2020 · 5 comments
Closed

Has no default export #1

503geek opened this issue Feb 26, 2020 · 5 comments

Comments

@503geek
Copy link

503geek commented Feb 26, 2020

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.

@503geek
Copy link
Author

503geek commented 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
Copy link
Contributor

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
Copy link
Author

503geek commented Mar 1, 2020

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.

@PatrykTucki
Copy link

@mike-schultz please have a look on #2.

@jeanettephung
Copy link
Contributor

Latest version of @types/zingchart resolves this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants