Warnings
foremtehan opened this issue ยท 1 comments
foremtehan commented
Hey man thanks for you package, However i deploy it on heroku it take the screenshot but it logs some error after that:
~ $ snap-tweet https://twitter.com/jack/status/20
snap-tweet https://twitter.com/jack/status/20
โ ๐ธ Snapped tweet #20 by @jack
/app/.heroku/node/lib/node_modules/snap-tweet/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
Error: spawn xdg-open ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn xdg-open',
path: 'xdg-open',
spawnargs: [ '/tmp/bcd1cc484539c835853116333adea229/snap-tweet-jack-20.png' ]
}
privatenumber commented
I think that's happening because snap-tweet by default saves the image to a temporary location and opens it to show you the result. I deliberately designed it to be slightly more user friendly but I guess it doesn't work a terminal-only environment.
You can specify a output directory to prevent this behavior.
snap-tweet https://twitter.com/jack/status/20 -o .