jRespond not defined

2 replies · opened Oct 19, 2020

Jjonsinclair1Oct 19, 2020

Hello,
I'm installing the JS via webpack (in a Rails 6 app).

I'm currently getting the following error in the console:

Uncaught ReferenceError: jRespond is not defined
    defaults functions.js:242
    init functions.js:86
    init functions.js:2021

here is my application.js file.

require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
require("jquery")
require("bootstrap")

require("js/plugins.min")
require("js/functions")

I have installed jrespond via yarn, but that hasn't helped.

Thanks!

Jjonsinclair1Oct 19, 2020

It also seems to have trouble loading jsLinking and FlexSlider

Uncaught TypeError: $ is not a function
    anonymous application-be011369c8caa8bf9107.js line 366 > Function:3
    jsLinking functions.js:157
    functions functions.js:220
    loadFlexSlider functions.js:1420
    init functions.js:2159
    jQuery 8
    js functions.js:2240
    js functions.js:2252
    js application-be011369c8caa8bf9107.js:2431
    Webpack 5
application-be011369c8caa8bf9107.js line 366 > Function:3:8
    anonymous application-be011369c8caa8bf9107.js line 366 > Function:3
    jsLinking functions.js:157
    functions functions.js:220
    loadFlexSlider functions.js:1420
    init functions.js:2159
SSemicolon WebSTAFFOct 19, 2020

Hello,

The issue with your Installation appears to be with incorrect customizations. As Canvas currently does not support or compatible with Webpack/Rails out of the box, the support on this will be limited.

  1. The jRespond Plugin is already included in the js/functions.js File, so we are not sure why you are receiving this error.

  2. $ is not a function error appears to be with jQuery Conflict or jQuery not included on the Page.

  3. Bootstrap JS is already included within the js/plugins.min.js File.

  4. Make sure that the Files are loaded in the exact order and unmodified.

Canvas is currently provided only as a Static HTML5/CSS3 Template and currently, there are no Webpack/Rails compatible files included with it. So, any further Customization is your responsibility.

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard