最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Uncaught TypeError: Popper is not a constructor - Stack Overflow

programmeradmin3浏览0评论

I try to edit CSS stlye of Tippy.js. So I npm install tippy and import it to my html like this

<script src="/min/tippy.js/umd/index.all.js"></script> 

But, it has some error.

Uncaught TypeError: Popper is not a constructor
    at createPopperInstance (createTippy.ts:677)
    at mount (createTippy.ts:694)
    at Object.show (createTippy.ts:961)
    at new_control.js:128
    at Array.forEach (<anonymous>)
    at createGraph (new_control.js:101)
    at Object.success (new_control.js:6)
    at u (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at k (jquery.min.js:2)

So, I have tried to npm install popper in my directory working file but,it's not work at all. Did I miss something?

I try to edit CSS stlye of Tippy.js. So I npm install tippy and import it to my html like this

<script src="/min/tippy.js/umd/index.all.js"></script> 

But, it has some error.

Uncaught TypeError: Popper is not a constructor
    at createPopperInstance (createTippy.ts:677)
    at mount (createTippy.ts:694)
    at Object.show (createTippy.ts:961)
    at new_control.js:128
    at Array.forEach (<anonymous>)
    at createGraph (new_control.js:101)
    at Object.success (new_control.js:6)
    at u (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at k (jquery.min.js:2)

So, I have tried to npm install popper in my directory working file but,it's not work at all. Did I miss something?

Share Improve this question asked Apr 16, 2019 at 6:58 Man In The MiddleMan In The Middle 231 gold badge1 silver badge3 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 14

Nice try although i would recend after installing popper by npm install, try to add this to your HTML file.

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

评论列表(0)

  1. 暂无评论