Package failing to load

Every time my bot starts I get this error. /opt/watcher/app-types/node/start.sh: line 49: forever: command not found

Hey @chessebuilderman this error means that the command in your project’s package.json file’s start script is invalid. There can be a number of reasons why this might be the case, from just having the wrong command there (a typo, perhaps) to there being some sort of install problem. If the latter, running enable-pnpm in the console in your project’s console might resolve the problem. If not then we might need to take a closer look, for which we’d need your project name.

That didn’t work. I kept getting the error. This is my package.json file
{
“name”: “swb”,
“version”: “0.0.1”,
“description”: “Super’s helper”,
“main”: “bot.js”,
“author”: “SuperWaltC”,
“license”: “MIT”,
“scripts”: {
“start”: “forever index.js”
},
“dependencies”: {
“discord.js”: “^11.5.1”,
“pm2”: “^3.5.1”,
“noblox.js”: “^4.2.6”,
“nodemon”: “^1.19.1”,
“forever”: “^1.0.0”,
“express”: “^4.16.4”,
“mongodb”: “^3.2.7”,
“mongoose”: “^5.6.9”,
@dmail/assert”: “^3.13.0”,
“assert”: “^2.0.0”,
“discordbotsgg”: “^0.2.1”,
“discord.bots.gg”: “^0.3.0”
}
}

So that tells me that the forever command isn’t available to your project. If enable-pnpm didn’t work then perhaps something’s going wrong with the install step that’s preventing that package from installing properly. I don’t see anything obvious (another common problem with package installation is having an incorrect version specification, but that seems to be correct, for instance). I’d be happy to take a closer look but will need your project name to do so.

The name is another-bot.glitch.me. And I changed forever index.js to node index.js and NONE of the packages are loading.

@cori So I tried something in the console. I did pnpm list and it showed all of my packages but I keep getting the error that it can’t find the module.

So I opened a remix of the project and I rank refresh in the command line and it worked. But when I ran it on the original project I get this image

Hey @chessebuilderman, when I opened this project this morning everything looked ok and the bot itself seems to be running; possibly your project was having an installation problem that resolve itself when the project restarted sometime between your post and now.

I note that your bot doesn’t start a listener, so it continually tries to restart. Take a look at this post about a sample express config if you’d like to resolve that, and please let us know if you encounter further difficulties.