{"action":"created","issue":{"url":"https://api.github.com/repos/fent/node-ytdl-core/issues/33","labels_url":"https://api.github.com/repos/fent/node-ytdl-core/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/fent/node-ytdl-core/issues/33/comments","events_url":"https://api.github.com/repos/fent/node-ytdl-core/issues/33/events","html_url":"https://github.com/fent/node-ytdl-core/issues/33","id":102492332,"number":33,"title":"Cannot read property 'formats' of undefined when I try to downloadFromInfo()","user":{"login":"johnRivs","id":1509546,"avatar_url":"https://avatars.githubusercontent.com/u/1509546?v=3","gravatar_id":"","url":"https://api.github.com/users/johnRivs","html_url":"https://github.com/johnRivs","followers_url":"https://api.github.com/users/johnRivs/followers","following_url":"https://api.github.com/users/johnRivs/following{/other_user}","gists_url":"https://api.github.com/users/johnRivs/gists{/gist_id}","starred_url":"https://api.github.com/users/johnRivs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnRivs/subscriptions","organizations_url":"https://api.github.com/users/johnRivs/orgs","repos_url":"https://api.github.com/users/johnRivs/repos","events_url":"https://api.github.com/users/johnRivs/events{/privacy}","received_events_url":"https://api.github.com/users/johnRivs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-22T01:06:20Z","updated_at":"2015-08-26T17:54:56Z","closed_at":"2015-08-24T21:44:59Z","body":"I'm using Express. Everything works fine when using `ytdl(url, options)`, however\r\n```js\r\nvar songInfo = ytdl.getInfo('https://www.youtube.com/watch?v=rHLbd3nvu88', { downloadURL: true });\r\n\r\nytdl.downloadFromInfo(songInfo, { filter: 'audioonly' }).pipe(res);\r\n```\r\nreturns this error:\r\n```\r\nTypeError: Cannot read property 'formats' of undefined\r\n    at downloadFromInfoCallback (/home/vagrant/www/lorem/node_modules/ytdl-core/lib/index.js:44:38)\r\n    at Function.downloadFromInfo (/home/vagrant/www/lorem/node_modules/ytdl-core/lib/index.js:82:3)\r\n    at /home/vagrant/www/lorem/index.js:17:10\r\n    at Layer.handle [as handle_request] (/home/vagrant/www/lorem/node_modules/express/lib/router/layer.js:95:5)\r\n    at next (/home/vagrant/www/lorem/node_modules/express/lib/router/route.js:131:13)\r\n    at Route.dispatch (/home/vagrant/www/lorem/node_modules/express/lib/router/route.js:112:3)\r\n    at Layer.handle [as handle_request] (/home/vagrant/www/lorem/node_modules/express/lib/router/layer.js:95:5)\r\n    at /home/vagrant/www/lorem/node_modules/express/lib/router/index.js:277:22\r\n    at Function.process_params (/home/vagrant/www/lorem/node_modules/express/lib/router/index.js:330:12)\r\n    at next (/home/vagrant/www/lorem/node_modules/express/lib/router/index.js:271:10)\r\n/home/vagrant/www/lorem/node_modules/ytdl-core/lib/sig.js:56\r\n    callback(null, info);\r\n    ^\r\nTypeError: undefined is not a function\r\n    at Object.exports.get (/home/vagrant/www/lorem/node_modules/ytdl-core/lib/sig.js:56:5)\r\n    at gotConfig (/home/vagrant/www/lorem/node_modules/ytdl-core/lib/info.js:160:9)\r\n    at /home/vagrant/www/lorem/node_modules/ytdl-core/lib/info.js:55:9\r\n    at null.<anonymous> (/home/vagrant/www/lorem/node_modules/ytdl-core/lib/info.js:107:5)\r\n    at emit (events.js:107:17)\r\n    at readableAddChunk (/home/vagrant/www/lorem/node_modules/ytdl-core/node_modules/jstream/node_modules/readable-stream/lib/_stream_readable.js:195:16)\r\n    at Readable.push (/home/vagrant/www/lorem/node_modules/ytdl-core/node_modules/jstream/node_modules/readable-stream/lib/_stream_readable.js:162:10)\r\n    at Transform.push (/home/vagrant/www/lorem/node_modules/ytdl-core/node_modules/jstream/node_modules/readable-stream/lib/_stream_transform.js:145:32)\r\n    at CStream.onobjectavailable (/home/vagrant/www/lorem/node_modules/ytdl-core/node_modules/jstream/lib/index.js:126:14)\r\n    at CStream.emit (events.js:129:20)\r\n```\r\nIn fact, when I have this alone\r\n```js\r\nvar songInfo = ytdl.getInfo('https://www.youtube.com/watch?v=rHLbd3nvu88', { downloadURL: true });\r\n```\r\nit throws:\r\n```\r\n/home/vagrant/www/lorem/node_modules/ytdl-core/lib/sig.js:56\r\n    callback(null, info);\r\n    ^\r\nTypeError: undefined is not a function\r\n    at Object.exports.get (/home/vagrant/www/lorem/node_modules/ytdl-core/lib/sig.js:56:5)\r\n    at gotConfig (/home/vagrant/www/lorem/node_modules/ytdl-core/lib/info.js:160:9)\r\n    at /home/vagrant/www/lorem/node_modules/ytdl-core/lib/info.js:55:9\r\n    at null.<anonymous> (/home/vagrant/www/lorem/node_modules/ytdl-core/lib/info.js:107:5)\r\n    at emit (events.js:107:17)\r\n    at readableAddChunk (/home/vagrant/www/lorem/node_modules/ytdl-core/node_modules/jstream/node_modules/readable-stream/lib/_stream_readable.js:195:16)\r\n    at Readable.push (/home/vagrant/www/lorem/node_modules/ytdl-core/node_modules/jstream/node_modules/readable-stream/lib/_stream_readable.js:162:10)\r\n    at Transform.push (/home/vagrant/www/lorem/node_modules/ytdl-core/node_modules/jstream/node_modules/readable-stream/lib/_stream_transform.js:145:32)\r\n    at CStream.onobjectavailable (/home/vagrant/www/lorem/node_modules/ytdl-core/node_modules/jstream/lib/index.js:126:14)\r\n    at CStream.emit (events.js:129:20)\r\n```"},"comment":{"url":"https://api.github.com/repos/fent/node-ytdl-core/issues/comments/135123082","html_url":"https://github.com/fent/node-ytdl-core/issues/33#issuecomment-135123082","issue_url":"https://api.github.com/repos/fent/node-ytdl-core/issues/33","id":135123082,"user":{"login":"fent","id":933490,"avatar_url":"https://avatars.githubusercontent.com/u/933490?v=3","gravatar_id":"","url":"https://api.github.com/users/fent","html_url":"https://github.com/fent","followers_url":"https://api.github.com/users/fent/followers","following_url":"https://api.github.com/users/fent/following{/other_user}","gists_url":"https://api.github.com/users/fent/gists{/gist_id}","starred_url":"https://api.github.com/users/fent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fent/subscriptions","organizations_url":"https://api.github.com/users/fent/orgs","repos_url":"https://api.github.com/users/fent/repos","events_url":"https://api.github.com/users/fent/events{/privacy}","received_events_url":"https://api.github.com/users/fent/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T17:54:56Z","updated_at":"2015-08-26T17:54:56Z","body":"do you need the `info`?"}}