Bootstrap: Uncaught TypeError: Cannot read property 'fn' of undefined

前端 未结 4 1929
隐瞒了意图╮
隐瞒了意图╮ 2021-02-05 20:21

I am trying to make an Electron application with Bootstrap. I get this error message:

Uncaught TypeError: Cannot read property \'fn\' of undefined
at setTransit         


        
4条回答
  •  庸人自扰
    2021-02-05 21:04

    I found a way to solve the problem.

    I added a script in the index.html:

    
    

    and this is the content of script.js:

    window.$ = window.jQuery = require('jquery'); // not sure if you need this at all
    window.Bootstrap = require('bootstrap');
    

    and we can remove these lines from index.html to avoid double import:

    
    
    
    

    I found this solution at: https://github.com/understrap/understrap/issues/449, under the comment from karo1915.

提交回复
热议问题