node-youtube
node-youtube copied to clipboard
Probably bug
Running this:
const Youtube = require('youtube.com');
var youtube = Youtube("https://www.youtube.com/watch?v=_W8ZGOKr1Po");
youtube.crop('0:05', '0:25', './file.mp4')
.then(function() {
console.log("Done");
}).catch(function(err) {
console.log("err : ", err)
});
Prompt me this:
[user@host twinbible] $ npm run-script build
> [email protected] build /home/user/Documentos/projects/dev/twinbible
> node ./bin/create-gifs
err : { Error: ENOENT: no such file or directory, open '/home/user/Documentos/projects/dev/twinbible/node_modules/youtube.com/tmp/crop-1511546819850.mp4'
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/user/Documentos/projects/dev/twinbible/node_modules/youtube.com/tmp/crop-1511546819850.mp4' }
(node:27611) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:27611) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:27611) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
fs.js:113
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
^
Error: ENOENT: no such file or directory, unlink '/home/user/Documentos/projects/dev/twinbible/node_modules/youtube.com/tmp/crop-1511546819850.mp4'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `node ./bin/create-gifs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2017-11-24T18_07_03_215Z-debug.log
Node version: v8.4.0
I see that the module creates a file in the tmp, download the video, but after that he removes and prompt me the error.
Getting the exact same error trying to do anything with node-youtube, any idea of a fix?
Getting the same issue with snapshot:
youtubeVideo.snapshot(formattedTime, './file.jpg')
.then(() => {
console.log("Done");
}).catch((err: any) => {
console.log("err : ", err)
});
{ Error: ENOENT: no such file or directory, open '[...]/node_modules/youtube.com/tmp/snap-1547732855208.jpg'
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '[...]/node_modules/youtube.com/tmp/snap-1547732855208.jpg' }
(node:9192) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:9192) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
fs.js:127
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
^
Error: ENOENT: no such file or directory, unlink '[...]/node_modules/youtube.com/tmp/snap-1547732855208.jpg'