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

node_modules/ng2-select2/ng2-select2.component.d.ts:12:14 - error TS2304: Cannot find name 'Select2Options'.So, finally I got a reason for this error. #151

Open
ShirinShirinak opened this issue Sep 28, 2020 · 0 comments

Comments

@ShirinShirinak
Copy link

This issue seems to have existed in the past and there was a comment saying that it got fixed in the newer version but I'm facing the same issue! What should I do?

My dependencies:
"@types/select2": "^4.0.49",
"ng-select2": "^1.2.2",
"ng2-select2": "^1.0.0-beta.16",
"select2": "^4.0.13"

ng2-select2 seems to be unusable! I just went through the demo and just copied their dependencies but same issue!

So, finally I got a reason for this error.
The interface Select2Options is removed/renamed to Options in the latest version 4.0.45 of the @types/select2. That's why I was getting this error.
To resolve this issue, I simply downgrade the @types/select2 package to 4.0.44 by running
npm install @ types/[email protected] --save and this worked for me.

But, guess what? @NejcZdovc already released the new version of ng2-select2 which is 1.0.0-beta.12 20 hours ago. and managed to change the dependencies in the package itself.
So, you can happily ignore the workaround done by me.
Happy coding...!!!

Originally posted by @imsatish36 in #124 (comment)

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

1 participant