UNEPT PEER DEPENDENCY jquery @> = 3.0.0 and popper.js @ ^ 1.11.0

When installing Bootstrap 4 (latest beta) with NPM: `npm install bootstrap@4.0.0-beta , I received this message:

+-- bootstrap@4.0.0-beta
+-- font-awesome@4.7.0
+-- UNMET PEER DEPENDENCY jquery@>=3.0.0
`-- UNMET PEER DEPENDENCY popper.js@^1.11.0

npm WARN bootstrap@4.0.0-beta requires a peer of jquery@>=3.0.0 but none was installed.
npm WARN bootstrap@4.0.0-beta requires a peer of popper.js@^1.11.0 but none was installed.
npm WARN b4starter@1.0.0 No repository field.

To remove this warning: npm i --save jquery popper.js

But why didn't the first team install Bootstrap 4, JQuery and Popper.js at a time? usually NPM should install dependencies !!

Any explanation please?

thank

+4
source share
2 answers

Bootstrap . , Bootstrap 4 jQuery Popper, bootstrap@4.0.0 -beta ​​ npm.

Bootstrap , Bootstrap:

  • bootstrap-css: jQuery Popper
  • bootstrap: , ,
+4

package.json npm. bootstrap , :

...
"dependencies": {},
"peerDependencies": {
 "jquery": "^3.0.0",
 "popper.js": "^1.12.3"
},
...

npm, , package.json , .

peerDependecies, : https://docs.npmjs.com/files/package.json#peerdependencies

+2

Source: https://habr.com/ru/post/1686330/


All Articles