jaggy / vue-pusher

A small pusher plugin for vue.js
44 stars 15 forks source link

Uncaught ReferenceError: Pusher is not defined #1

Closed lukpep closed 8 years ago

lukpep commented 8 years ago

Uncaught ReferenceError: Pusher is not defined

in lines: this.pusher = new Pusher(api_key, options);

when I try to use:

Vue.use(require('vue-pusher'), {
    api_key: 'xxxx',
    options: {
        encrypted: true,
    }
});

should i install something else? https://www.npmjs.com/package/pusher maybe?

jaggy commented 8 years ago

Try putting the pusher script in your markup for now.

I'm actually trying to find a way to use pusher as an npm dependency but that packages seems to be a server side package? Not really sure.

<script src="https://js.pusher.com/3.2/pusher.min.js"></script>
lukpep commented 8 years ago

@jaggy seconds before your answer i've figured it out - but thanks :) Works like charm - good work

moay commented 8 years ago

There is a way, I'll add a pr.

MuhammadZeeshanAshraf commented 4 years ago

@jaggy seconds before your answer i've figured it out - but thanks :) Works like charm - good work

how do you solve the problem ? kindly tell me