node-youtube-dl
node-youtube-dl copied to clipboard
Unable to find /app/node_modules/youtube-dl/bin/details
I am running this NPM package on a Heroku instance with no problems for the last few months. I updated the NPM package today as I was having issues with a YouTube update. Locally the package is running perfectly as intended but when I deploy to Heroku it throws the following the error.
> node .
internal/fs/utils.js:220
throw err;
^
Error: ENOENT: no such file or directory, open '/app/node_modules/youtube-dl/bin/details'
at Object.openSync (fs.js:440:3)
at readFileSync (fs.js:342:35)
at module.exports (/app/node_modules/youtube-dl/lib/get-binary.js:15:30)
at Object.<anonymous> (/app/node_modules/youtube-dl/lib/youtube-dl.js:18:41)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/app/node_modules/youtube-dl/bin/details'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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! /app/.npm/_logs/2020-01-25T07_40_55_433Z-debug.log
+1 UPDATE: reinstall can solve(maybe with an https proxy), it is due to the download error.
I've noticed that redeploying to Heroku sometimes fixes the issues. Other times I have to change the youtube-dl version installed and redeploy. Any ideas why this is happening? It's very annoying.