Reputation: 173
I wish to use ng-bootstrap.
The documentation ask to install bootstrap CSS as dependency, but do not include jQuery
if I install bootstrap with npm I get warning that it need jquery and popper.
$ npm i -S bootstrap
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
Is there a way to install bootstrap css in my project without adding unwanted peer dependencies ?
Upvotes: 2
Views: 1654
Reputation: 564
just try this in Window:
npm install --save @ng-bootstrap/ng-bootstrap
just try this in Linux:
sudo npm install --save @ng-bootstrap/ng-bootstrap
Upvotes: 1
Reputation: 117370
Having a missing peer dependencies warning on jQuery / popper is normal at this point. The reason for this warning is that ng-bootstrap only needs Bootstrap CSS. It doesn't require Bootstrap JS nor its dependencies (popper.js).
We can't get rid of this warning, unfortunately, as Bootstrap does not publish packages that would have CSS only. The only way to install Bootstrap CSS is to to install the whole package that has peer dependencies set to jQuery / popper.
To cut the long story short: this warning is expected and there are technical limitations preventing us from getting rid of it. You do not need jQuery / popper to use ng-bootstrap and you should not install those manually. You should also ignore missing peer dependencies warning at this point.
Upvotes: 5