socket.io/socket.io.js 404 (Not Found)
i am using XAMPP on Mac to run this but in console i see socket.io/socket.io.js 404 (Not Found)
how to get rid of this error
Comments (10)
-
repo owner -
reporter i have installed npm install socket.io but problem i that <script src='/socket.io/socket.io.js'></script>
Failed to load resource: the server responded with a status of 404 (Not Found)
as browser is unable to find 'socket.io.js' i have to do some setting ?
note: 1:socket.io installed path is "/Users/ais/node_modules/socket.io" 2:i am using XAMPP to run code "/Applications/XAMPP/xamppfiles/htdocs/step5"
-
repo owner Are you running this from the port specified in server.js?
For example, for step 5 and 6:
http://localhost:2013/
-
reporter no it`s running on default port of xampp. have i change port of xampp ??
-
repo owner For steps 5, 6 and 7, you need to run the server app server.js on Node -- not xampp (or some other server) used by the earlier steps. I should be clearer about that in the instructions -- apologies!
Make sure you've followed all these steps in the instructions for step 5 (you can leave your xampp server running, but for this step make sure to open the address localhost:2013):
1.
Using the code from the step 5https://bitbucket.org/webrtc/codelab/complete/step5 directory, run the server (server.js). To start the server, run the following command from a terminal in your application directory:
node server.js
2.
From your browser, open localhost:2013. Open a new tab page or window in any browser and open localhost:2013 again, then repeat. 3.
To see what's happening, check the Chrome DevTools console (Command-Option-J, or Ctrl-Shift-J).
Hope that works!
-
reporter ok thanks a lots it`s working
-
repo owner Great! I'll tweak the instructions.
-
reporter - changed status to resolved
-
Hello..Can i get any help ? I have installed socket.io using npm install socket.io but too i am not getting 8th step correct.When i open localhost:8080 in two tabs i don't get two video elements.What is the issues ? <script src='/socket.io/socket.io.js'></script> i cannot find socket.io anywhere in my app folder.
-
repo owner Hi Priyanka
This codelab is no longer maintained — you may want to try the codelab at codelabs.developers.google.com/codelabs/webrtc-web.
Do you see errors in the browser console? You should see Socket.io code in the node_modules folder.
You might want to try the Socket.io tutorial at socket.io/get-started/chat/
Sam
- Log in to comment
Apologies if you've done this already, but did you install Socket.io with Node Package Manager?
Run the following from a terminal in your app directory:
npm install socket.io