Unmet Peer Dependendency poper.js

I am having problems using some ng-bootstrap dropdown component due to jquery 3x dependency which in turn cannot find popper.js

See it in my console

Uncaught Error: Popper.js required for popup dropdown list

How do I get around this?

Installing jquery using npm shows a dependency on popper.js that is not in the npm registry

└── UNMET PEER DEPENDENCY popper.js@ ^ 1.11.0

Here are my dependencies in package.json

"dependencies": { "@angular/animations": "^4.2.4", "@angular/common": "^4.2.4", "@angular/compiler": "^4.2.4", "@angular/core": "^4.2.4", "@angular/forms": "^4.2.4", "@angular/http": "^4.2.4", "@angular/platform-browser": "^4.2.4", "@angular/platform-browser-dynamic": "^4.2.4", "@angular/router": "^4.2.4", "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.1", "bootstrap": "^4.0.0-beta", "core-js": "^2.4.1", "font-awesome": "^4.7.0", "jquery": "^3.2.0", "rxjs": "^5.4.2", "zone.js": "^0.8.14" }, 

+7
source share
2 answers

Now Popper.js can be installed from npm:

 npm install popper.js --save 
+15
source

Found the answer here bootstrap.min.js: 6 Unused error: Bootstrap popup window requires Popper.js

It looks like popper.js is not in the npm registry, but theres cdn to it, adding index.html below to my applications solves the dropdown list problem

 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> 
-2
source

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


All Articles