[SOLVED] Setting up a server using glitch.com having trouble


#1

https://developer.playcanvas.com/en/tutorials/real-time-multiplayer/
This is the tutorial i am useing. I was doing fine till i got to the part in the tutorial called
“setting up the project.”
this is the error it gave me when i pressed launch

[Network.js?id=19973135&branchId=ddcc2a21-7dea-425f-a717-df6cc96c3772:1]: Uncaught ReferenceError: io is not defined

ReferenceError: io is not defined
at https://launch.playcanvas.com/api/assets/files/scripts/Network.js?id=19973135&branchId=ddcc2a21-7dea-425f-a717-df6cc96c3772:1:15

https://imagebin.ca/v/4hQy5cl7SsG0 that’s what the code looks like

if you have any idea what i did wrong or need more info let me know. im kinda new to setting up servers.


#2

Have you got the Socket.io library file in your project?


#3

No I don’t how do I get the socket.io library file.


#4

The tutorial covers this:


#5

oh yea i did that already sorry. just didn’t understand what you meant.


#6

Then it’s likely to be a script order problem. Go to settings (bottom left):

image

Go to Script Loading Order
image

Move socket.js to the top of the list.


#7

alright it worked thank you.