Order of require statements in application.js
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
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
thansk