e-enes / invitron

The Best Way to Track Your Discord Server's Invites!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install instructions don't work

sidboy55555 opened this issue · comments

Hi,

I just followed the install instruction but they don't seem to work, atleast not with nodejs 20.5

npm install doesn't do much, only install packages but not build the bot.

what npm install logs:

discord-invite-tracker# npm install --loglevel verbose
npm verb cli /usr/bin/node /usr/bin/npm
npm info using npm@10.3.0
npm info using node@v20.5.1
npm verb title npm install
npm verb argv "install" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/root/.npm/_logs/2024-01-12T21_12_30_847Z-
npm verb logfile /root/.npm/_logs/2024-01-12T21_12_30_847Z-debug-0.log
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 371ms
npm http fetch GET 200 https://registry.npmjs.org/undici 13ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@discordjs%2frest 10ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/discord.js 30ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@discordjs%2fws 34ms (cache hit)

up to date, audited 213 packages in 829ms

60 packages are looking for funding
  run `npm fund` for details

3 low severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
npm verb exit 0
npm info ok

and ofcourse node run start errors out

discord-invite-tracker# npm run start

> discord-invite-tracker@1.2.5 start
> node dist/src/index.js

node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module '/srv/bots/invite/dist/src/index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.5.1

I hope the install instructions get updated soon :)

Dear Sidney,

Thank you for highlighting this issue.

Upon thorough review, I discovered an error in the launch script. I am pleased to inform you that this has now been rectified.

Regarding the issue you encountered, it seems a critical step was overlooked in the project's building process, particularly in Step 5. While the npm install command covers the installation part, a complete build of the bot requires some additional steps. You need to run either tsc or npm run build to ensure a proper build. After this, it's essential to move the .env file into the dist/ directory and then execute npm start.

I recognize that this process may seem intricate. To simplify these steps, I am currently developing an update that will enhance the launch process, making it more intuitive and user-friendly for all code users. This update is expected to be released in the near future.

Please feel free to reach out if you need further help.

Best regards,
Enes Tahiri