3

There are lots of questions on SO, where OP is using some library, for example jQuery, and is getting following error:

ReferenceError: libraryName is not defined

Some examples:

This error is usually caused by one of the following:

  • not including the library file at all,
  • including scripts in wrong order (i.e. using a script which depends on the library before including the library).

That makes all these questions duplicates, because there is one solution to all of them. So, I think we need a general reference question for such questions, which would apply to any JavaScript library and provide full, comprehensive, canonical answer.

It seems that there is a question which could be considered a general reference, but it's only about jQuery. It rather wouldn't be a good idea to close a question about, for example, Underscore.js as a duplicate of it.

4
  • 5
    Should we really be closing such questions as dupes? Shouldn't we close them as simple typographical errors instead? Jan 26, 2016 at 11:27
  • 1
    @FrédéricHamidi I would agree that it's a simple typographical error, but this is certainly not an error which can't be reproduced, because people still ask such questions. Jan 26, 2016 at 11:34
  • 3
    Technically, it cannot be reproduced as soon as the missing reference is added. But yes, this close reason is a little... schizoid. On the other hand, I don't believe that, say, the C++ folks have a canonical for You forgot to include <iostream>. Jan 26, 2016 at 11:37
  • 1
    Could be. Write it.
    – user1228
    Jan 26, 2016 at 16:12

0

You must log in to answer this question.

Browse other questions tagged .