Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error Pusher.ScriptReceivers[1] is not a function #4

Open
wahyupermadie opened this issue Mar 24, 2018 · 12 comments
Open

error Pusher.ScriptReceivers[1] is not a function #4

wahyupermadie opened this issue Mar 24, 2018 · 12 comments

Comments

@wahyupermadie
Copy link

hello i want to ask why i got error Pusher.ScriptReceivers[1] is not a function while i type a chat.
i follow all of your tutorial.
but i got this error and trying to fix but i cant.

thanks

@jaouadballat
Copy link
Owner

jaouadballat commented Mar 24, 2018

Are you using two or more instances of the library in your project? . The reason is that the library makes use of the global namespace (window.Pusher) for some of its functionality and if a second instance is loaded it will override any previous instances.

@wahyupermadie
Copy link
Author

wahyupermadie commented Mar 24, 2018 via email

@jaouadballat
Copy link
Owner

wish version of laravel you use ?

@wahyupermadie
Copy link
Author

wahyupermadie commented Mar 24, 2018 via email

@jaouadballat
Copy link
Owner

in bootstrap.js you have
import Pusher from 'pusher-js' import Echo from 'laravel-echo' window.Pusher = require('pusher-js');
as you can see you have imported pusher twice delete the first line and try again

@wahyupermadie
Copy link
Author

wahyupermadie commented Mar 24, 2018 via email

@jaouadballat
Copy link
Owner

have you installed dependencies ??

@wahyupermadie
Copy link
Author

wahyupermadie commented Mar 24, 2018 via email

@jaouadballat
Copy link
Owner

now i'm using just phone when i came home i'will try. try to fork my project into yours

@wahyupermadie
Copy link
Author

wahyupermadie commented Mar 24, 2018 via email

@alvinteeky
Copy link

alvinteeky commented Oct 7, 2019

Did the error fixed ? i have the same problem?

@Khuram007
Copy link

please comment to require('./bootstrap') on the second app.js file, I have 3 files 1) admin_app.js 2) admin_search.js and app.js ,this error show on multiple instances of the root.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants