Open god-father-xuez opened 5 years ago
Additional Details
[PM2] Applying action restartProcessId on app [TipBot](ids: 0)
[PM2] [TipBot](0) ✓
┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬───────────┬────
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ use
├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼───────────┼────
│ TipBot │ 0 │ fork │ 15587 │ online │ 629 │ 0s │ 0% │ 13.1 MB │ tes
└──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴───────────┴────
Use `pm2 show <id|name>` to get more details about an app
Done in 0.44s.
#:~/Documents/TipBot$ pm2 update
Be sure to have the latest version by doing `npm install pm2@latest -g` before doi
[PM2] Saving current process list...
[PM2] [v] Modules Stopped
[PM2] Applying action deleteProcessId on app [all](ids: 0)
[PM2] [TipBot](0) ✓
[PM2] [v] All Applications Stopped
[PM2] [v] PM2 Daemon Stopped
[PM2] Spawning PM2 daemon with pm2_home=/home/testserver/.pm2
[PM2] Restoring processes located in /home/testserver/.pm2/dump.pm2
[PM2] Process /home/testserver/Documents/TipBot/bot/bot.js restored
>>>>>>>>>> PM2 updated
┌──────────┬────┬─────────┬──────┬───────┬────────┬─────────┬────────┬─────┬──────
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem
├──────────┼────┼─────────┼──────┼───────┼────────┼─────────┼────────┼─────┼──────
│ TipBot │ 0 │ 1.0.0 │ fork │ 15909 │ online │ 0 │ 0s │ 0% │ 24.2
└──────────┴────┴─────────┴──────┴───────┴────────┴─────────┴────────┴─────┴──────
Use `pm2 show <id|name>` to get more details about an app
Seems like Yimp|NPM is causing this issue?
warning discord.js > snekfetch@3.6.4: use node-fetch instead
warning embed-creator@1.2.4: Creating embeds is a simple task that should not be done through one function. Please use Discord.js's functions instead.
warning jsonpath > jison > nomnom@1.5.2: Package no longer supported. Contact support@npmjs.com for more info.
warning jsonpath > jison > jison-lex > nomnom@1.5.2: Package no longer supported. Contact support@npmjs.com for more info.
warning regex > jison > nomnom@1.5.2: Package no longer supported. Contact support@npmjs.com for more info.
[2/4] Fetching packages...
info fsevents@1.2.6: The platform "linux" is incompatible with this module.
info "fsevents@1.2.6" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > discord.js@11.4.2" has unmet peer dependency "bufferutil@^3.0.3".
warning " > discord.js@11.4.2" has unmet peer dependency "erlpack@discordapp/erlpack".
warning " > discord.js@11.4.2" has unmet peer dependency "node-opus@^0.2.7".
warning " > discord.js@11.4.2" has unmet peer dependency "opusscript@^0.0.6".
warning " > discord.js@11.4.2" has unmet peer dependency "sodium@^2.0.3".
warning " > discord.js@11.4.2" has unmet peer dependency "libsodium-wrappers@^0.7.3".
warning " > discord.js@11.4.2" has unmet peer dependency "uws@^9.14.0".
[4/4] Building fresh packages...```
solved in discord DM, suggested adding new folder name logs to ignore watch list
where to put logs folder? in root? I tried that, didnt help solve it
@telostia doesnt matter just has to coincide with whats inside ecosystem.config.js so pm2 knows where to write the logs to
whats odd is that. even with the right ecosystem.config.js configs. its stil giving the error... nodejs updated, tried on both windows and linux , updated pm2. there is something really wrong here. Heres the details to the file: module.exports = { apps: [ { name: 'tipbot', script: './bot/bot.js', cwd: './botfolder', instance_id_env: '0', watch: true, ignore_watch : ['node_modules', 'logs', 'Downloads', '.git'], error_file: './tipbot-err.log', out_file: './tipbot-out.log', env: { NODE_ENV: 'development' }, env_production: { NODE_ENV: 'production' } } ] };
and heres whats in the default.json : "moderation":{ "pm2Name": "tipbot", "perms": ["Admin","Moderator","Community Leader","Bots", "bots"], "botDev": "bots", "logchannel": "ommited", "botspamchannels": ["ommited"] }
Heres the screenshot of it constantly restarting pm2:
Heres the error from the log:
Those are just pretty much default values. Am I doing something wrong there?
did you rename the config file...says it cant see one
ecosystem.config.js? yes. those are the first things i do. If I haven't then there wouldnt be any log files generated right?
ok I found the problem. cwd: './botfolder', should be pointing to ./ since I only renamed the ecosystem.js and its looking for the file in botfolder folder.
hm.. that leads to another error:
WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names. WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode TypeError: bot.user.setActivity is not a function
Don't know why its not finding app instance 0. It is in ecosystem.config.js name: 'tipbot', script: './bot/bot.js', cwd: './', instance_id_env: '0', I haven't made any changes to the bot.js yet also.
thats a normal issue with, the config package conflicts with node.js config it looks for so they sorta clash but nothing to worry about the other issue is completely different, probably has to do with setting up the bot properly with discord
ok I just had to remove the yarn.lock and yarn install again. works :D thanks @MSFTserver !
I cant seem to pass this error - Codebase, wallet and dependencies installed but still cant seem to get the bot to work. These errors are found within the
pm2 monit
section