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

Compile issues - Namespace 'Choices' has no exported member 'ClassNames' #9

Closed
astr0sl0th opened this issue Jun 22, 2018 · 14 comments
Closed
Labels
enhancement New feature or request

Comments

@astr0sl0th
Copy link

Are you in the right place?

  • For issues or feature requests related to the choices library go to Choices.js
  • For general technical questions, post a question on StackOverflow tagged appropriately.

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

Current behavior

When trying to compile I am recieing the following error:

ERROR in node_modules/nb-choices/dist/components/custom-choice.component.d.ts(7,25): error TS2694: Namespace 'Choices' has no exported member 'ClassNames'.
node_modules/nb-choices/dist/components/custom-choice.component.d.ts(8,19): error TS2694: Namespace 'Choices' has no exported member 'Choice'.

Expected behavior

Should compile without errors

Minimal reproduction of the problem with instructions

yarn add nb-choices
ng serve

Environment


Angular version: 6


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
Others:

@NetanelBasal
Copy link
Owner

Thanks for the report. It doesn't support yes Angular 6. I will do it in the future or would love to accept a PR.

@NetanelBasal NetanelBasal added the enhancement New feature or request label Jun 22, 2018
@NetanelBasal
Copy link
Owner

#8

@astr0sl0th
Copy link
Author

astr0sl0th commented Jun 22, 2018

@NetanelBasal It is technically all working as I am using it with angular 6 just throws that error on compile

@NetanelBasal
Copy link
Owner

Is it happening only in production?

@astr0sl0th
Copy link
Author

No just when building or ng serve I haven't tried production but I would imagine it would be the same result. Looks to be just some type errors nothing on an angular based level

@NetanelBasal
Copy link
Owner

Very wired, cause no one report this kind of issue, can you help investigate, please?

@astr0sl0th
Copy link
Author

Of course. I am currently doing some digging now. I am using nb-choices in two angular projects both versions 6+ and both have the same errors

@NetanelBasal
Copy link
Owner

Ok, thank, let me know.

@astr0sl0th
Copy link
Author

The root problem seems to be in custom-choice.component.d.ts

classNames: Choices.classNames; <- Choice.classNames does not exist on Choices
data: Choices.Choice; <- Choices.Choice does not exist on Choices

To silence these compile errors I have set any as fix not sure if there is a better way in dealing with this but it works for now...

classNames: any
data: any;

@NetanelBasal
Copy link
Owner

Ok, thanks, I will look into it later.

@NetanelBasal
Copy link
Owner

Changed it in 1.0.3, can you confirm it's working please?

@astr0sl0th
Copy link
Author

Is it on NPM?

@NetanelBasal
Copy link
Owner

yes

@astr0sl0th
Copy link
Author

I can confirm that your update has fixed the errors I was getting. Thank you :)

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

No branches or pull requests

2 participants