Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of require statements in application.js #198

Open
DEV-jOker opened this issue Aug 27, 2020 · 2 comments
Open

Order of require statements in application.js #198

DEV-jOker opened this issue Aug 27, 2020 · 2 comments

Comments

@DEV-jOker
Copy link

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

@Insood
Copy link

Insood commented Sep 29, 2020

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

@bighit661
Copy link

thansk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants