Jump to content

Fail on Start

Closed 1.2.1

2KTwice
2KTwice

Posted

Hello, I followed all the steps, but couldn't make it work, using BotRepear, tried Node 16, 17, 18, same result:
 

v18.17.1
:/home/container$ if [[ -d .git ]] && [[ ${AUTO_UPDATE} == "1" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then /usr/local/bin/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then /usr/local/bin/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f /home/container/package.json ]; then /usr/local/bin/npm install; fi; /usr/local/bin/node /home/container/${JS_FILE}
container@pterodactyl~ Server marked as running...

up to date, audited 225 packages in 4s
22 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
node:internal/modules/cjs/loader:1080
  throw err;
  ^
Error: Cannot find module '../build/Release/canvas.node'
Require stack:
- /home/container/node_modules/canvas/lib/bindings.js
- /home/container/node_modules/canvas/lib/canvas.js
- /home/container/node_modules/canvas/index.js
- /home/container/src/main/establishConnection.js
- /home/container/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/home/container/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/container/node_modules/canvas/lib/bindings.js',
    '/home/container/node_modules/canvas/lib/canvas.js',
    '/home/container/node_modules/canvas/index.js',
    '/home/container/src/main/establishConnection.js',
    '/home/container/index.js'
  ]
}


Also tried to init on local server, I have the same result:
i.e: npm install canvas --save

 

npm install canvas --save                                                                                                                                                                                       1 ↵ ——(Sat,Sep23)—˜
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm ERR! code 1
npm ERR! path /Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --update-binary
npm ERR! Failed to execute '/Users/2ktwice/.nvm/versions/node/v18.16.0/bin/node /Users/2ktwice/.nvm/versions/node/v18.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | arm64
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v108-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v108-darwin-unknown-arm64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v108-darwin-unknown-arm64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/2ktwice/.nvm/versions/node/v18.16.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/2ktwice/.nvm/versions/node/v18.16.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/2ktwice/Library/Caches/node-gyp/18.16.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/2ktwice/Library/Caches/node-gyp/18.16.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/2ktwice/.nvm/versions/node/v18.16.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/2ktwice/Library/Caches/node-gyp/18.16.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! /bin/sh: pkg-config: command not found
npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/2ktwice/.nvm/versions/node/v18.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 22.6.0
npm ERR! gyp ERR! command "/Users/2ktwice/.nvm/versions/node/v18.16.0/bin/node" "/Users/2ktwice/.nvm/versions/node/v18.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd /Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas
npm ERR! gyp ERR! node -v v18.16.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/2ktwice/.nvm/versions/node/v18.16.0/bin/node /Users/2ktwice/.nvm/versions/node/v18.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 22.6.0
npm ERR! node-pre-gyp ERR! command "/Users/2ktwice/.nvm/versions/node/v18.16.0/bin/node" "/Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm ERR! node-pre-gyp ERR! cwd /Users/2ktwice/Downloads/DiscordLink/DiscordLinkBot/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v18.16.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/2ktwice/.npm/_logs/2023-09-23T20_10_17_169Z-debug-0.log

Could you help me please?

Amino

Posted

Don’t put —save when installing stuff 

just run npm i canvas 

2KTwice

Posted

I didn't change anything, just tried to solve on my own before create a ticket, BotReapear doesn't work as expected, I suggest Sparked. Just upload, and i'ts up and running.

2KTwice

Posted

I have another issue, bot is set as administrator as documentation indicates, perhaps of it, I'm receiving this in the console, could you give me a hand please?
 

DiscordAPIError[50013]: Missing Permissions
    at handleErrors (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:687:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SequentialHandler.runRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1072:23)
    at async SequentialHandler.queueRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:913:14)
    at async _REST.request (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1218:22)
    at async GuildMemberRoleManager.add (/home/container/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:131:7) {
  requestBody: { files: undefined, json: undefined },
  rawError: { message: 'Missing Permissions', code: 50013 },
  code: 50013,
  status: 403,
  method: 'PUT',
  url: 'https://discord.com/api/v10/guilds/1079263826513498125/members/852891796715208734/roles/1120680845158662224'
}

 

2KTwice

Posted

Attaching images from DS Dev Portal

CleanShot 2023-09-23 at 18.59.22@2x.png

CleanShot 2023-09-23 at 18.59.48@2x.png

Amino

Posted

Bot reaper works great. Not sure what issues you were having with it.
It looks like you bot is not above the role that it is trying to grant

Amino

Posted

Changed Status from Pending to Closed

1.8m

Downloads

Total number of downloads.

8.2k

Customers

Total customers served.

123.6k

Files Sold

Total number of files sold.

2.5m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.