Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probably bug #2

Open
lucasdiedrich opened this issue Nov 24, 2017 · 2 comments
Open

Probably bug #2

lucasdiedrich opened this issue Nov 24, 2017 · 2 comments

Comments

@lucasdiedrich
Copy link

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.

@bezNZ
Copy link

bezNZ commented Nov 20, 2018

Getting the exact same error trying to do anything with node-youtube, any idea of a fix?

@gabriellupu
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants