While installing Bootstrap 4 (the latest beta version) with NPM : `npm install [email protected], I got this message :
+-- [email protected]
+-- [email protected]
+-- UNMET PEER DEPENDENCY jquery@>=3.0.0
`-- UNMET PEER DEPENDENCY popper.js@^1.11.0
npm WARN [email protected] requires a peer of jquery@>=3.0.0 but none was installed.
npm WARN [email protected] requires a peer of popper.js@^1.11.0 but none was installed.
npm WARN [email protected] No repository field.
To remove this warning : npm i --save jquery popper.js
But, why the first command didn't install Bootstrap 4, Jquery and Popper.js in one time? normally NPM should install dependencies !!
Any explaination please?
Thank you
The problem was reported to the Bootstrap development team in this issue. In principle, Bootstrap 4 can be used without jQuery and Popper, but these two optional packages are considered as peer dependencies in the [email protected] version installed with npm.
According to the comments made by the Bootstrap developers in the discussion, they are going to offer two different Bootstrap packages:
All depend of the configuration of the package.json from the npm package. if you check the respository for bootstrap here, you can see this:
...
"dependencies": {},
"peerDependencies": {
"jquery": "^3.0.0",
"popper.js": "^1.12.3"
},
...
When you install a npm package, just the dependencies specified in package.json file as dependencies would be download with the package.
If you want to know more about peerDependecies
this is the link: https://docs.npmjs.com/files/package.json#peerdependencies
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With