Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.

TravisCI on my discord bot using Discord.io #311

Open
kubo6472 opened this issue Mar 3, 2019 · 2 comments
Open

TravisCI on my discord bot using Discord.io #311

kubo6472 opened this issue Mar 3, 2019 · 2 comments

Comments

@kubo6472
Copy link

kubo6472 commented Mar 3, 2019

https://api.travis-ci.org/v3/job/501107907/log.txt
It fails on winston. I still don´t understand the code very well, so I am learning by trying. That is why I am asking you for what is wrong. In this log below, there is something on that use of const in strict mode, it may be that I set up Travis wrong, that mey be the strict mode thing, anyway, if you know, how to resolve this issue, I will be very happy.

Cloning into 'kubo6472/instructorbot'...
$ cd kubo6472/instructorbot
$ git checkout -qf c6f39da174faa45dd5dd923c4f327d01c2e14bca
Setting environment variables from repository settings
$ export CODECOV_TOKEN=[secure]
nvm.install
2.17s$ nvm install 0.10
Downloading and installing node v0.10.48...
Downloading https://nodejs.org/dist/v0.10.48/node-v0.10.48-linux-x64.tar.xz...
Computing checksum with sha256sum
Checksums matched!
Now using node v0.10.48 (npm v2.15.1)
$ node --version
v0.10.48
$ npm --version
2.15.1
$ nvm --version
0.34.0
install
4.16s$ npm install discord.io winston --save
npm WARN engine winston@3.2.1: wanted: {"node":">= 6.4.0"} (current: {"node":"0.10.48","npm":"2.15.1"})
npm WARN engine winston-transport@4.3.0: wanted: {"node":">= 6.4.0"} (current: {"node":"0.10.48","npm":"2.15.1"})
npm WARN engine readable-stream@3.2.0: wanted: {"node":">= 6"} (current: {"node":"0.10.48","npm":"2.15.1"})
discord.io@2.5.3 node_modules/discord.io
├── tweetnacl@0.14.5
├── ws@1.1.5 (options@0.0.6, ultron@1.0.2)
└── cjopus@0.0.4
winston@3.2.1 node_modules/winston
├── is-stream@1.1.0
├── stack-trace@0.0.10
├── one-time@0.0.4
├── triple-beam@1.3.0
├── logform@2.1.2 (ms@2.1.1, fecha@2.3.3, fast-safe-stringify@2.0.6, colors@1.3.3)
├── readable-stream@3.2.0 (inherits@2.0.3, util-deprecate@1.0.2, string_decoder@1.2.0)
├── winston-transport@4.3.0 (readable-stream@2.3.6)
├── diagnostics@1.1.1 (enabled@1.0.2, kuler@1.0.1, colorspace@1.1.1)
└── async@2.6.2 (lodash@4.17.11)
0.08s$ node insbot/bot.js
/home/travis/build/kubo6472/instructorbot/node_modules/winston/lib/winston.js:10
const logform = require('logform');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/travis/build/kubo6472/instructorbot/insbot/bot.js:2:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
The command "node insbot/bot.js" exited with 8.
Done. Your build exited with 1.
@retrixe
Copy link
Contributor

retrixe commented Mar 3, 2019

I recommend join https://discord.gg/0MvHMfHcTKVVmIGP for future questions.

May be unrelated, may not, but I see you're using discord.io from npm, use npm install https://github.com/woor/discord.io/tarball/gateway_v6 winston instead because your bot will be broken with npm install discord.io since the npm version is outdated and dead.

Apart from that, if you're starting out (perhaps with a tutorial on Medium or Digital Trends) I recommend following this tutorial: https://cadence.gq/misc/discord.io

Also, why use Travis-CI?

@kubo6472
Copy link
Author

kubo6472 commented Mar 3, 2019

I recommend join https://discord.gg/0MvHMfHcTKVVmIGP for future questions.

May be unrelated, may not, but I see you're using discord.io from npm, use npm install https://github.com/woor/discord.io/tarball/gateway_v6 winston instead because your bot will be broken with npm install discord.io since the npm version is outdated and dead.

Apart from that, if you're starting out (perhaps with a tutorial on Medium or Digital Trends) I recommend following this tutorial: https://cadence.gq/misc/discord.io

Also, why use Travis-CI?

Hi, thanks for quick reply, okay, using the npm you sent now, w8ing for download. I am starting to do CI/CD for all projects that may be worth it, I am planning on sharing these repos with a few friends, and when everyone will make updates, I just wanna make sure, that it is tested and noone will break it before push to Heroku.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants