【问题标题】:Resolving dependencies using npm while installing Bootstrap 4在安装 Bootstrap 4 时使用 npm 解决依赖关系
【发布时间】:2021-06-28 15:51:59
【问题描述】:

在使用 npm 安装 Bootstrap 4 时,它会显示以下错误:

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.

我正在使用 Git Bash,我也尝试单独安装 jQuery,但无法安装。 有人可以帮我解决这些问题吗?马努谢谢

【问题讨论】:

  • 不,我撤回我之前的声明。

标签: twitter-bootstrap npm bootstrap-4


【解决方案1】:

您需要安装这些依赖项并将它们保存给您package.json

npm install jquery@3.0.0 --save npm install popper.js@1.11.0 --save

The docsnpm install

【讨论】:

    【解决方案2】:

    也试试这个:

    npm install --save @ng-bootstrap/ng-bootstrap

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-25
      • 1970-01-01
      • 2018-05-13
      • 2022-11-18
      • 2013-11-02
      • 2016-04-24
      • 2015-02-17
      相关资源
      最近更新 更多