Closed gruberjl closed 2 years ago
Good point, @gruberjl! How about using something like axios
or request-promise
to convert to promises?
Any plans for a fix? I can't run ampify without getting errors due to request('GET', imageUrl)
not being a valid use of request
library (should be request.get(imageUrl)
, but then again the async issue needs to be fixed). Wouldn't it be better, at this point, to just let this part of functionality be commented out until fixed?
I added a PR here: https://github.com/rkazakov/ampify/pull/21
Thanks for your contribution, @bkniffler! Will you be able to use promises instead of async/await as we want to keep Node support prior to version 8? Also can I ask you to add unit test coverage for your code please?
request is asynchronous. It doesn't look like the code supports the promise properly. We'll need to convert to promises, async/await, or use a package like sync-request.
Let me know which you'd prefer and I'll send a pull request.