Uncaught ReferenceError: Pusher is not defined

3.2k Views Asked by At

When I try to load //js.pusher.com/2.2/pusher.min.js","js on click envent

It is showing

Uncaught ReferenceError: Pusher is not defined

How to solve this?

1

There are 1 best solutions below

0
On

Here's how to diagnose if Pusher should be defined:

Is the URL accessible for you?

The first thing to do is go to the URL that you are trying and ensure that the script contents loads in your browser.

Do you see the script loaded when going to js.pusher.com/2.2/pusher.min.js? How about over SSL http://js.pusher.com/2.2/pusher.min.js?

If you can't load the script then it's possible something is blocking it.

Is the Pusher object defined?

Next, you can try going to this following JSBin example. Do you see "function" appear in the output? http://jsbin.com/zumepu/1/edit?html,output

If so, it means the script has loaded the the Pusher function is defined.

Note: From the findings above, please update the questions if you get more information