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

Update code to work with recent version of node #137

Open
jfix opened this issue Dec 8, 2019 · 11 comments
Open

Update code to work with recent version of node #137

jfix opened this issue Dec 8, 2019 · 11 comments

Comments

@jfix
Copy link

jfix commented Dec 8, 2019

As reported in ticket #136 the last known version of node that allows building the project was version 8-based. More recent versions, like v12, throw errors. As the modules that work with version 8 are rather outdated and cannot always be updated automatically via an npm audit fix, I'd like to request that the code base could be updated to a recent version of node. Thank you for this great project that I'd like to potentially use!

Another suggestion, although I'm not sure how realistic it is, would be to indicate in the developer documentation to use node version 8 for installation, and for running a more recent node version. I haven't yet tried to run the application with either version so I'm not well placed. Maybe later.

@dariusk
Copy link
Contributor

dariusk commented Dec 19, 2019

Thanks, and sorry for the delay in response! I will update this. Your error as reported in #136 has to do with the canvas module, and I'll do my best to make that work. The big issue has to do with the build process, and can be tricky.

@dariusk
Copy link
Contributor

dariusk commented Dec 19, 2019

(I will also make sure this is compatible with node 12)

@jfix
Copy link
Author

jfix commented Feb 10, 2020

Hi @dariusk just wondering whether you think you may have time to look at this? Or if there is anything I can do?

@dariusk
Copy link
Contributor

dariusk commented Feb 10, 2020

Sorry about this, it got lost in holiday obligations and then off my radar. Am digging in right now and will let you know. I'm trying to update everything so there are no more vulnerabilities etc. It might take me a few sessions of development over the course of this week to get everything in good working order.

@dariusk
Copy link
Contributor

dariusk commented Feb 12, 2020

I think I have everything done but now I need to test everything to make sure nothing broke. Hopefully will have code merged by Friday.

@jfix
Copy link
Author

jfix commented Feb 12, 2020

Yay, something to test on a bleak February weekend! ;-) Thanks!

@jfix
Copy link
Author

jfix commented Feb 22, 2020

Looking forward to your merge. :-)

@dariusk
Copy link
Contributor

dariusk commented Feb 24, 2020

I've made a PR from a branch -- this works for me but my testing environment is pretty limited. If you could give it a try and let me know if you manage to get Shortcut running that would be great. Thank you for the issue and sorry again for the delays.

@jfix
Copy link
Author

jfix commented Feb 24, 2020

@dariusk Thanks for that. I'm supposing the branch is 2020-update. I will report back with updates.

@jfix
Copy link
Author

jfix commented Mar 1, 2020

Following the instructions in the Wiki (the Getting started for developers page) I managed to set up the client and the server and the episode server almost without a hitch.

The server is running with a couple of warnings but no errors (app.js too big and mode falls back to production). However, no recent episodes are displayed (following the guide I expected to see the Nixon resignation episode). Below a screenshot of what the server shows (note I updated the tagline to see whether that worked).

image

Also, the logo is broken because the image path is somehow not correctly interpreted:

image

I called the client URL to add an episode (I guess) http://localhost:3000/api/ABC123/update/s01e01 which returned the expected success message:

{
"status": "success",
"showNumber": "s01e01"
}

Furthermore, in the client console I can see this output (is it a problem that gentle exited with code 1 and signal null at this point?):

✘-1 ~/Projects/shortcut/server [2020-update|✔] 
23:39 $ npm start

> [email protected] start /Users/jakob/Projects/shortcut/server
> node server.js

No SSL key and/or cert found, not enabling https server
ran our create
Express server listening on port 3000
gentle exited with code 1 and signal null
downloading episode... http://localhost:8081/s01e01/s01e01.mp3
fetching show data...
EYYY [

...

  [ '39380', 'effort' ],
  [ '39640', 'to' ],
  [ '39750', 'complete' ],
  [ '40260', 'the' ],
  [ '40410', 'term' ],
  [ '40740', 'of' ],
  [ '40850', 'office' ],
  ... 340 more items
]
downloaded
finish
making waveform... /tmp/s01e01.mp3
null {
  sample_rate: 44100,
  channels: 1,
  duration: 217.085563,
  format: 'mp3',
  bit_rate: 128006
}
Progress: 207976 / 207976
{
  ETag: '"c517eec34d755b9cb2b6c8ef5ae434f2"',
  Location: 'https://shortcut-test-jfix.s3.eu-west-3.amazonaws.com/episodes/s01e01-data.json',
  key: 'episodes/s01e01-data.json',
  Key: 'episodes/s01e01-data.json',
  Bucket: 'shortcut-test-jfix'
}
uploaded episodes/s01e01-data.json

Also, the S3 test bucket has been configured for read access by anyone and with a CORS policy of *.
https://shortcut-test-jfix.s3.eu-west-3.amazonaws.com/episodes/s01e01-data.json

The local data bucket at http://localhost:8081/ is also running and serving the episodes.json as expected as well as the s01e01.json and the other audio files (.ts, .mp3, .m3u8).

Would you have an idea where to look for the problem?

@jfix
Copy link
Author

jfix commented Apr 6, 2020

Hi @dariusk, just politely asking whether my bug report above is useful or whether the problem is entirely on my end. I know we all have other issues right now (hope you're safe!), so no hard feelings if not! Thanks.

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