bootstrap-rubygem icon indicating copy to clipboard operation
bootstrap-rubygem copied to clipboard

Order of require statements in application.js

Open DEV-jOker opened this issue 5 years ago • 2 comments

In rails 5.2,

Following document order of require statements causing the

Uncaught TypeError: Cannot read property 'hasAttribute' of null in browser console

Updating the order to

//= require bootstrap
//= require jquery3
//= require popper

fixed the bug

DEV-jOker avatar Aug 27 '20 06:08 DEV-jOker

Thanks - this helped!

Any idea what to do about

Uncaught TypeError: Cannot read property 'find' of undefined at Object.find (selector-engine.self-50a89b920756572e3185426ba7460787cca59d51522bf63812df4d91a9749bc2.js?body=1:37) at carousel.self-24e54ec126825103ca5316cdefcbc5a12feeadecb21dbf6ad127b05a004fe76d.js?body=1:720 at handler (event-handler.self-73a6f6aa49089c2ef6321c26f56c5b8015f55e3df62f3128d6886947158f3267.js?body=1:78)

Looks like the polyfill code isn't being loaded..

return (_ref = []).concat.apply(_ref, polyfill_js.find.call(element, selector));

EDIT: Apparentoy doing //= require bootstrap vs works vs //= require bootstrap-sprockets

Insood avatar Sep 29 '20 18:09 Insood

thansk

bighit661 avatar Oct 20 '20 14:10 bighit661