#binding tool

18 messages · Page 1 of 1 (latest)

sullen capeBOT
#
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by staff
modest dragon
#

and sometimes i get this error

C:\Users\niki\Downloads\Ticketbot\Ticket Bot (SRC)>node .
Starting bot, this can take a while..
C:\Users\niki\Downloads\Ticketbot\Ticket Bot (SRC)\node_modules\bindings\bindings.js:121
        throw e;
        ^

Error: The module '\\?\C:\Users\niki\Downloads\Ticketbot\Ticket Bot (SRC)\node_modules\better-sqlite3\build\Release\better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 108. This version of Node.js requires
NODE_MODULE_VERSION 115. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Module._extensions..node (node:internal/modules/cjs/loader:1473:18)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at bindings (C:\Users\niki\Downloads\Ticketbot\Ticket Bot (SRC)\node_modules\bindings\bindings.js:112:48)
    at new Database (C:\Users\niki\Downloads\Ticketbot\Ticket Bot (SRC)\node_modules\better-sqlite3\lib\database.js:48:64)
    at new Enmap (C:\Users\niki\Downloads\Ticketbot\Ticket Bot (SRC)\node_modules\enmap\src\index.js:152:18)
    at Object.<anonymous> (C:\Users\niki\Downloads\Ticketbot\Ticket Bot (SRC)\utils.js:15:18)
    at Module._compile (node:internal/modules/cjs/loader:1376:14) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v20.11.1
coarse bay
#

Did you do what that error tells you to do to fix it?

modest dragon
#

and i tried 16, 18, 20

coarse bay
#

Huh? You shouldn’t use a different node version no. You should rebuild the package for your current node version

modest dragon
#

oh that

#

i tried it

#

and i get this

modest dragon
#
{
  "name": " Tickets",
  "version": "6.9",
  "description": "Tickets",
  "main": "index.js",
  "engines": {
    "node": ">=16.9.0"
  },
  "scripts": {
    "start": "node index"
  },
  "author": "ticket",
  "license": "ISC",
  "dependencies": {
    "@discordjs/collection": "^1.1.0",
    "@discordjs/rest": "^1.1.0",
    "ansi-colors": "^4.1.3",
    "discord-html-transcripts": "^2.6.1",
    "discord.js": "^14.4.0",
    "enmap": "^5.9.0",
    "fs": "^0.0.1-security",
    "glob": "^7.2.0",
    "js-yaml": "^4.1.0",
    "node-fetch": "^2.7.0",
    "paypal-rest-sdk": "^1.8.1",
    "stripe": "^10.10.0"
  }
}
coarse bay
#

Why do you use enmap? Isn’t that… way outdated? Also djs 14.4.0 is outdated too

modest dragon
#

the script is old, i dont have time to upgrade it

coarse bay
#

And having /rest and /collection installed separately is also discouraged

#

You do have the time. Else you wouldn’t have the time to fix it either

#

And the fix in your case is upgrading

modest dragon
#

but thank you so much man