How to install ngx-bootstrap v7.0.0 for Angular 11?

Viewed 786

I am using ngx-bootstrap 5.x.x in my Angular 8 project but now I have migrated my Angular v8 to v11 and I start facing issues with dropdown. It does not open on first click. I find they are recommended to use v7.0.0 but when I install it using

npm i ngx-bootstrap@7.0.0 --save

It throws an error

npm ERR! code ETARGET
npm ERR! notarget No matching version found for ngx-bootstrap@7.0.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

Any help would be appreciate!

3 Answers

You can see the official npm CDN link where the latest version is 6.2.0. As there is no 7.0 version available with the npm CDN that explains the problem. If you want to force install the version which is not yet published and in the queue then use

npm i ngx-bootstrap@7.0.0-rc.1

Since 7.0.0 is a Release candidate version, you should mention -rc and version. it becomes npm i ngx-bootstrap@7.0.0-rc.1 you can see install command from here.

it is ready to go out, but it isn't proven yet so it's not ready to be marked as a stable release quite yet. You can think of it as a mature beta release. for more details, you can visit wikipedia

Related