Open jwbensley opened 6 years ago
Based on the info in this SO post I have upgraded my NodeJS to v7.10.1 and I can start the app now (sorry if this is basic info but I'm new to NodeJS):
Object.values is a new feature in ES2017. It is very bleeding edge. Node.js has full support for it from version 7.0.
6.8.1 supports it, but it is considered unstable and is locked behind the --harmony flag.
You can either:
Upgrade to the latest Node.js LTS and use --harmony Upgrade to the latest Node.js Current Use a polyfill
bensley@htpc-ubuntu:~$ nvm install 7.10.1
######################################################################## 100.0%
Checksums empty
Now using node v7.10.1 (npm v4.2.0)
bensley@htpc-ubuntu:~$ nvm use 7.10.1
Now using node v7.10.1 (npm v4.2.0)
bensley@htpc-ubuntu:~$ slackadaisical
I can start slackadaisical now but trying to select any room crashes:
TypeError: Cannot read property 'ts' of undefined
at SlackAPI.markChannelRead (/usr/local/lib/node_modules/slackadaisical/dist/SlackAPI.js:137:76)
at MessagesList.loadHistory (/usr/local/lib/node_modules/slackadaisical/dist/MessagesList.js:133:26)
at /usr/local/lib/node_modules/slackadaisical/dist/MessagesList.js:87:23
at Request._callback (/usr/local/lib/node_modules/slackadaisical/dist/SlackAPI.js:166:53)
at Request.self.callback (/usr/local/lib/node_modules/slackadaisical/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/usr/local/lib/node_modules/slackadaisical/node_modules/request/request.js:1161:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
I've upgraded to the latest version available to me:
bensley@htpc-ubuntu:~$ nvm install 10.9.0
######################################################################## 100.0%
Checksums empty
Now using node v10.9.0 (npm v6.2.0)
bensley@htpc-ubuntu:~$ nvm use 10.9.0
Now using node v10.9.0 (npm v6.2.0)
bensley@htpc-ubuntu:~$ slackadaisical
I can join some channels but joining others still crasahes:
TypeError: Cannot read property 'ts' of undefined
at SlackAPI.markChannelRead (/usr/local/lib/node_modules/slackadaisical/dist/SlackAPI.js:137:76)
at MessagesList.loadHistory (/usr/local/lib/node_modules/slackadaisical/dist/MessagesList.js:133:26)
at /usr/local/lib/node_modules/slackadaisical/dist/MessagesList.js:87:23
at Request._callback (/usr/local/lib/node_modules/slackadaisical/dist/SlackAPI.js:166:53)
at Request.self.callback (/usr/local/lib/node_modules/slackadaisical/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request.<anonymous> (/usr/local/lib/node_modules/slackadaisical/node_modules/request/request.js:1161:10)
at Request.emit (events.js:182:13)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/slackadaisical/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:273:13)
@jwbensley your latest error looks a lot like #15
My workaround was to select channels with ^L
and Enter
so you might want to try that.
Regarding the version issue (which anyone can stumble over even if they're not new to node) you could open a PR updating the README to call out the required node version and/or update package.json with "engines" and "engineStrict" properties.
(note: not a maintainer just a user)
Hi @tjcelaya - the solution to my problem was to log into Slack and change my "Mark as Read" settings.
Previously I had "Start me off where I left off, and mark the channel read" selected. I changed to "Start me at the newest message, but leave the unseen messages unread" and the issue stopped.
It seems the issue was that trying to change to a channel with unread messages, the Slackadaisical client would try to mark the channel/messages as read and crash as per my stack trace.
This has stopped now that I have changed the setting as per above.
Hi there,
When I try to run your client I get the following stack dump
This is my info: