[Solved] Project stuck on 'Starting'

Project Name: web-minecraft (private)
I can edit it, but when press ‘Show’ it doesnt start.
The listener code is there, I dont see whats keeping it ‘offline’.

Could you share the project page with us? It is probably a code error.

1 Like

If you add me as a collaborator, I can help you out. I’ve had that issue many times before.

@anon69241012 @RiversideRocks I made the project public. You two should be able to look at the code now. (web-minecraft)

Took a look at your project. You need to define a start script in package.json, which is the command that Glitch runs to start your project. The project is stuck on “Starting…” because it doesn’t know what command to run to start.

Also, your version of three in package.json seems to be invalid.

Replacing your package.json with this should get your project to start:

{
  "main": "server.js",
  "scripts": {
    "start": "node server.js"
  },
  "dependencies": {
    "discord.js": "^12.1.1",
    "express": "^4.17.1",
    "mineflayer": "^2.11.0",
    "three": "^0.115.0",
    "vec3": "^0.1.3"
  }
}

1 Like

I remixed the project and I got it to work with some code editing six-midnight-crowd.glitch.me

Now it says Cannot find module 'express'

Would you mind sharing your package.json?

{
  "main": "server.js",
  "scripts": {
    "start": "node server.js"
  },
  "dependencies": {
    "discord.js": "^12.1.1",
    "mineflayer": "^2.11.0",
    "three": "^1.58.1",
    "vec3": "^0.1.3",
    "express": "^4.17.1"
  }
}

Hm I think the version number for three doesn’t exist, so installing the packages is failing.

Try replacing the three version number, like this:

"three": "^0.115.0",

Same error, Error: Cannot find module 'express'

Also I do not require(“three”) in NodeJS since its used in the client-side javascript.

Yeah, but not being able to find a package (like three@1.58.1) causes the entire install to fail.

Strangely enough, I got fresh blank project with this package.json to work just fine:

{
  "main": "server.js",
  "scripts": {
    "start": "node server.js"
  },
  "dependencies": {
    "discord.js": "^12.1.1",
    "mineflayer": "^2.11.0",
    "three": "^0.115.0",
    "vec3": "^0.1.3",
    "express": "^4.17.1"
  }
}

Weird. This accually happened me back some time ago when I tried making a Discord Bot. It couldn’t find the ‘discord.js’ module. I’ll try remixing it. Thanks for the help.

1 Like

I remixed it. Now it works. Thanks!

Good to hear!​​​​​​​​

1 Like