Con't install packages


#1

Hello.
I was developing my bot on github, but when I uploaded it to glitch, it didn’t worked.
Here is my project link: https://glitch.com/see/#!/warlock-gaming-bot

I have a lot of errors, but the error it shows to me is:

Please someone help me!


#2

You required the module komada but you didn’t install it. Go to package.json, click Add Packages at the top, and install it.


#3

I’ve done it, but it didn’t work. Here is my package.json file:

{
  "name": "Winston",
  "version": "0.9.0",
  "description": "Javascript bot using the Komada framework",
  "main": "index.js",
  "dependencies": {
    "cheerio": "^1.0.0-rc.2",
    "discord.js": "github:hydrabolt/discord.js",
    "ffmpeg": "0.0.4",
    "komada": "^0.21.1",
    "moment": "^2.24.0",
    "moment-duration-format": "^1.3.0",
    "ms": "^2.0.0",
    "node-opus": "^0.2.7",
    "querystring": "^0.2.0",
    "request": "^2.85.0",
    "snekfetch": "^3.5.8",
    "sqlite3": "^3.1.13",
    "steamapi": "^1.3.5",
    "ytdl-core": "^0.20.4",
    "node-fetch": "^2.3.0",
    "lodash": "^4.17.11"
  },
  "devDependencies": {},
  "repository": {
    "type": "git",
    "url": "git+https://github.com/TheBigerGamer/minigam1ng_bot_v3"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index.js"
  },
  "author": "DarkenLight Mage",
  "license": "Apache-2.0"
}

MOD EDIT: formatting


#4

Try running enable-pnpm in your console


#5

Now it only says this:
Resolving: total 96, reused 91, downloaded 0

EDIT: Nevermind, now it says me this:


#6

If you watch the entire install process you’ll see an error message like the following in your logs

This tells us that discord.js is having trouble downloading during your install process - it can’t find the file it’s expecting. The correct way to specify that package is like this: "discord.js": "discordjs/discord.js", which will enable pnpm to find the package and install it.

When you get past that error you’re likely to run into an error requireing express, because you haven’t requested that to be installed either, so if you add that to your package.json as well you might get to a working state.

Hope this helps!


#7

I think I didn’t understood. What am I suposed to do?

EDIT: Ok. I’ve done what you said, but now, it is giving me this:

What is happening now?


#8

The first line is just a warning - promises support in the fs package isn’t fully release yet.

The other message looks like a problem with how you’re using Komada, but I don’t know enough about it to offer much help. You might look at their docs, and they look like they might have a discord server you could ask for help on.


#9

Well, I’ll try to ask here. I’ll create a new topic. But thanks anyway.