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.

Error: "ReferenceError: List is not defined"

See original GitHub issue

I have the listJS file in the script tag at the head tag of top of the html tree.html page. Then I have a sortnotebooklist.js referenced also in the script tag at the bottom of the page. The JS file is the following:

var options = {
    valueNames: [ 'last_modified' ]
};

var notebook_items = new List('notebook_items', options);

I get the error on the browser console: ReferenceError: List is not defined

How do I fix this? Did I imported the library incorrectly? I’ve tried using both <script src="http://listjs.com/no-cdn/list.js" type="text/javascript"></script> and <script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js" /> in the <head> tag without success.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
kylelau93commented, Apr 8, 2017

Try to rearrange the scripts codes.

<script type="text/javascript" src="js/list.min.js"></script>
<script type="text/javascript" src="js/your-own.js"></script>
2reactions
javvecommented, Sep 22, 2014

I don’t know what the problem is, but it is not List.js 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - ReferenceError: list is not defined with mongoose
You were using NODE package(nodemon) specific syntax to iterate over arraylist and node package was not installed on your machine.
Read more >
ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
ReferenceError : "x" is not defined. The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >
3 Ways to Solve jQuery - Uncaught ReferenceError: $ is not ...
1) One of the most common reason of "ReferenceError: $ is not defined" in jQuery based application is that jQuery plugin is included...
Read more >
Uncaught ReferenceError: current is not defined - ServiceNow
To ignore these errors in the next test run, use 'Add all client errors to warning/ignored list' links. I got this error in...
Read more >
ReferenceError: "x" is not defined - JavaScript
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
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