jquery - 未满足的对等依赖 popper.js

标签 jquery npm

由于依赖 jquery 3x,我在使用某些 ng-bootstrap 下拉组件时遇到问题,而 jquery 3x 又无法找到 popper.js

在我的控制台中查看此内容

Uncaught Error: Bootstrap dropdown require Popper.js

我该如何解决这个问题?

使用 npm 安装 jquery 显示了对 popper.js 的依赖,但该依赖不在 npm 注册表中

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

这是我在 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"
  },

最佳答案

Popper.js 现在可以从 npm 安装:

npm install popper.js --save

关于jquery - 未满足的对等依赖 popper.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45656215/

相关文章:

node.js - 从自己的 gitlab 服务器安装 Node 模块

javascript - 可重用的 jQuery 函数

jquery - JQuery扩展后如何避免div相互碰撞

javascript - 将类(class)应用于每第 3 个列表项

javascript - JQuery Mobile 列表没有获得正确的样式

windows - npm 不会安装 node sass

git - 始终跳过链接到自定义脚本的 npm 安装的预推送 Hook

node.js - Node Sass 版本 7.0.1 与 Mac 中 React 中的 ^4.0.0 不兼容

node.js - 已经安装了新版本的npm,但是还在用旧版本

javascript - 用 php 在 ajax 中发帖让我得到 undefined index