question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jQuery plugin says "jQuery is not defined"

See original GitHub issue

I have run the following command line arguments: npm install --save jquery npm install --save jquery-slimscroll

Inside of my index.js file, the first three lines import these modules:

import $ from 'jquery';
window.jQuery = $;
import 'jquery-slimscroll';

But I receive the following error:

jquery.slimscroll.js:474 Uncaught ReferenceError: jQuery is not defined

Any suggestions?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

20reactions
cloudmucommented, Sep 9, 2016

require('jquery-slimscroll');

instead of

import 'jquery-slimscroll';

2reactions
cloudmucommented, Sep 9, 2016
import jquery from 'jquery';
window.$ = window.jQuery=jquery;
Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Easy Ways to Fix the "jQuery is Not Defined" Error - Kinsta
Method 2: Make Sure jQuery Is Loaded ... You may experience the “jQuery is not defined error” when jQuery is included but not...
Read more >
How to fix the "jQuery is not defined" error in WordPress
The problem is usually caused by a mistake in the code. In order to fix it, use the keyboard Ctrl + U to...
Read more >
javascript - JQuery - $ is not defined - Stack Overflow
That error means that jQuery has not yet loaded on the page. Using $(document).ready(.
Read more >
jQuery is not defined: Common causes and a simple solution
What are the common causes of jQuery is not defined? ... The most obvious cause of this error is that you forgot to...
Read more >
Fixing the Common jQuery Error in WordPress
Common Causes of getting “Uncaught ReferenceError: jQuery Is Not Defined” in WordPress · One of your plugins is conflicting with other plugins, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found