Closed blaze534 closed 1 year ago
nothing it was my error but now i got this @PetyXbron C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\index.js:255 slashCommands.push(commandFile.data.toJSON()); ^
TypeError: Cannot read properties of undefined (reading 'toJSON')
at Object.
@blaze534 can you please run the command npm list
for me to check your installed dependencies?
├── @discordjs/rest@1.2.0 ├── axios@0.27.2 ├── chalk@4.1.2 ├── discord-api-types@0.37.10 ├── discord.js@14.5.0 ├── fs@0.0.1-security ├── minecraft-motd-util@1.1.12 ├── minecraft-server-util@5.3.1 ├── ms@2.1.3 └── quick.db@7.1.3 @PetyXbron
@PetyXbron i have node 17.6.0 if this can help you
Hey again,
I think this issue is almost related to issue #16. The error is created because of the wrong syntax in some slash commands. Please go to folder /slashes
and check every command file from lines 6 to 12, it should look like this:
Maybe the fastest method will be if you compare your local files with those uploaded to GitHub here. Find a mistake.
Let me know when you are done and please share your results.
list.js:
ip.js:
version.js:
Status.js:
the only thing is in some commands there is a translated description @PetyXbron
hi changed the my slashes command whith yours im gonna try to change description but for now run
it run idk what is was wrong i have always the activity broken @PetyXbron
@blaze534 your list.js
has wrong data. Please change it to:
(lines 8 to 12)
module.exports = {
data: new SlashCommandBuilder()
.setName('list') //Name of command - RENAME THE FILE TOO!!!
.setDescription('Sends the actual list of players online') //Description of command - you can change it :)
};
You had it in a normal chat command file format and no slash command file format.
This is my log what can i do C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\bindings\bindings.js:121 throw e; ^
Error: The module '\?\C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\better-sqlite3\build\Release\better_sqlite3.node' (C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\quick.db\src\index.js:7:15)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10) {
code: 'ERR_DLOPEN_FAILED'
}
was compiled against a different Node.js version using NODE_MODULE_VERSION 93. This version of Node.js requires NODE_MODULE_VERSION 102. Please try re-compiling or re-installing the module (for instance, using
npm rebuild
ornpm install
). at Object.Module._extensions..node (node:internal/modules/cjs/loader:1181:18) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:999:19) at require (node:internal/modules/cjs/helpers:102:18) at bindings (C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\bindings\bindings.js:112:48) at new Database (C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\better-sqlite3\lib\database.js:48:64) at Object.Node.js v17.6.0 PS C:\Users\Utente\Desktop\BOTS\DOGMC_BOT> npm rebuild npm ERR! code 1 npm ERR! path C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\better-sqlite3 npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || npm run build-release npm ERR! > better-sqlite3@7.6.2 build-release npm ERR! > node-gyp rebuild --release npm ERR! prebuild-install warn install No prebuilt binaries found (target=17.6.0 runtime=node arch=x64 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.4.1 npm ERR! gyp info using node@17.6.0 | win32 | x64 npm ERR! gyp info find Python using Python version 3.10.5 found at "C:\Users\Utente\AppData\Local\Programs\Python\Python310\python.exe" npm ERR! gyp http GET https://nodejs.org/download/release/v17.6.0/node-v17.6.0-headers.tar.gz npm ERR! gyp http 200 https://nodejs.org/download/release/v17.6.0/node-v17.6.0-headers.tar.gz npm ERR! gyp http GET https://nodejs.org/download/release/v17.6.0/SHASUMS256.txt npm ERR! gyp http GET https://nodejs.org/download/release/v17.6.0/win-x86/node.lib npm ERR! gyp http GET https://nodejs.org/download/release/v17.6.0/win-x64/node.lib npm ERR! gyp http GET https://nodejs.org/download/release/v17.6.0/win-arm64/node.lib npm ERR! gyp http 200 https://nodejs.org/download/release/v17.6.0/SHASUMS256.txt npm ERR! gyp http 404 https://nodejs.org/download/release/v17.6.0/win-arm64/node.lib npm ERR! gyp http 200 https://nodejs.org/download/release/v17.6.0/win-x64/node.lib npm ERR! gyp http 200 https://nodejs.org/download/release/v17.6.0/win-x86/node.lib npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! gyp ERR! find VS - not found npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS ** npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! gyp ERR! find VS ** npm ERR! gyp ERR! find VS npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47) npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14) npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1090:16) npm ERR! gyp ERR! System Windows_NT 10.0.22000 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" npm ERR! gyp ERR! cwd C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\better-sqlite3 npm ERR! gyp ERR! node -v v17.6.0 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Utente\AppData\Local\npm-cache_logs\2022-09-27T09_15_19_547Z-debug-0.log PS C:\Users\Utente\Desktop\BOTS\DOGMC_BOT> npm install npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'minecraft-bot@1.6.7', npm WARN EBADENGINE required: { node: '18.8.0', npm: '8.18.0' }, npm WARN EBADENGINE current: { node: 'v17.6.0', npm: '8.5.1' } npm WARN EBADENGINE } npm ERR! code 1 npm ERR! path C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\better-sqlite3 npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || npm run build-release npm ERR! > better-sqlite3@7.6.2 build-release npm ERR! > node-gyp rebuild --release npm ERR! prebuild-install warn install No prebuilt binaries found (target=17.6.0 runtime=node arch=x64 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.4.1 npm ERR! gyp info using node@17.6.0 | win32 | x64 npm ERR! gyp info find Python using Python version 3.10.5 found at "C:\Users\Utente\AppData\Local\Programs\Python\Python310\python.exe" npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! gyp ERR! find VS - not found npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS ** npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! gyp ERR! find VS ** npm ERR! gyp ERR! find VS npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47) npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14) npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1090:16) npm ERR! gyp ERR! System Windows_NT 10.0.22000 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" npm ERR! gyp ERR! cwd C:\Users\Utente\Desktop\BOTS\DOGMC_BOT\node_modules\better-sqlite3 npm ERR! gyp ERR! node -v v17.6.0 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Utente\AppData\Local\npm-cache_logs\2022-09-27T09_16_47_052Z-debug-0.log