NPM WARN: [email protected] requires a peer of popper.js
Popper.js is not really necessary
Bootstrap 4.0.0 release contains 2 new files bootstrap.bundle.js
and bootstrap.bundle.min.js
which contain Popper.js inside and you really do not need it.
bootstrap.bundle.min.js
is exactly Bootstrap.js + Popper.js.
In Bootstrap v4.0.0 documentation it is still mentioned that you need the file for some components
Components requiring JavaScript
- Dropdowns for displaying and positioning (also requires Popper.js)
- Tooltips and popovers for displaying and positioning (also requires Popper.js)
I have not tested it but I think it is not necessary
Solutions
You can use the NPM path 'bootstrap/dist/js/bootstrap.bundle.js'.
Or if you finally want to download Popper.js
, download the version you need.
bootstrap/package.json
Bootstrap v4.0.0
"popper.js": "^1.12.9"
Bootstrap v4.1.1
"popper.js": "^1.14.1"
Bootstrap 4.0.0 requires popper, so just add "popper.js": "^1.12.9"
to the package.json
For example dropdown, tooltips and popovers won't work:
https://www.codeply.com/go/CuOfa7UnUA (broken w/o popper)
Note: As of 4.1, popper.js is only required for dropdowns, tooltips and popovers.
If it is saying as follows image in, then
It is asking for install popper.js for your project. So get the cmd on your project location and run the following command.
npm install popper.js --save
Then you can see as in following image.