How to install popper.js with Bootstrap 4?

后端 未结 11 889
眼角桃花
眼角桃花 2020-12-07 17:17

From what I\'ve read so far, popper.js is a big pain with Bootstrap 4. I can\'t get it to work. I keep getting this error:

Error: Bootstrap dropdown r

11条回答
  •  死守一世寂寞
    2020-12-07 18:03

    Bootstrap 4 has two dependencies: jQuery 1.9.1 and popper.js 1.12.3. When you install Bootstrap 4, you need to install these two dependencies.

    • Install popper.js: npm install popper.js@^1.12.3 --save
    • Install jQuery: npm install jquery@1.9.1 --save
    • Install Bootstrap: npm install bootstrap@4.0.0-beta.2 --save

    For Bootstrap 4.1

    • npm install popper.js@^1.14.3 --save
    • npm install jquery@3.3.1 --save
    • npm install bootstrap@4.1.1 --save

提交回复
热议问题