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

Not running properly in Replit.com #3934

Closed
idkwhattoputhere121 opened this issue May 18, 2021 · 3 comments
Closed

Not running properly in Replit.com #3934

idkwhattoputhere121 opened this issue May 18, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@idkwhattoputhere121
Copy link

Literally does not run.
npm start does not work
npm test is continuously doing useless file checks...

@idkwhattoputhere121 idkwhattoputhere121 added the bug Something isn't working label May 18, 2021
@KtheVeg
Copy link

KtheVeg commented Jun 23, 2021

Have you manually installed socket.io using the shell? In the shell area, type npm install socket.io

Also, if this isn't an issue with socket.io, but with npm on replit, you should check the replit help

@allracs
Copy link

allracs commented Jul 9, 2021

@idkwhattoputhere121 does your package.json look like this? In order to run npm start the "main" has to be defined as well as the "scripts.start".

{
    "main": "index.js",
    "scripts": {
        "start": "node index.js",
        "...": "..."
    },
    "...": "..."
}

You should install the packages through the shell as commented by @Veggieoskibroski, I just created a NodeJS project in replit.com, followed the Get Started guide and I haven't had any issue to run socket.io.

These are the steps I followed:

  1. Create Node project
  2. shell: npm init -y
  3. shell: npm install express
  4. shell: npm install socket.io
  5. in package.json: define the "start" script in "scripts"
  6. follow the Get Started guide from above to create a simple chat project
  7. shell: npm start
  8. Done :)

You can check my replit code here if you want.

darrachequesne added a commit that referenced this issue Aug 30, 2021
The link will now point towards a sample project, instead of the root
repository.

Related: #3934
@darrachequesne
Copy link
Member

I've updated the link to an actual example: https://replit.com/@socketio/socketio-minimal-example

Thanks for reporting the issue 👍

@darrachequesne darrachequesne added documentation Improvements or additions to documentation and removed bug Something isn't working labels Aug 30, 2021
dzad pushed a commit to dzad/socket.io that referenced this issue May 29, 2023
The link will now point towards a sample project, instead of the root
repository.

Related: socketio#3934
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants