我试图在heroku上使用spotify-dl,所以我制作了一个自定义生成包,并将其用于我的heroku应用程序,但是节点模块始终出现错误。
该库没有curl选项
https://github.com/SwapnilSoni1999/spotify-dl
这是我的自定义buildpacks编译文件
#!/bin/sh
echo "Installing spotify-dl"
npm install -g --save spotify-dl
我正在尝试在我的应用上使用spotify-dl,这是我得到的错误
ChildProcessError: Command failed: spotifydl -o "/app/songs" "open.spotify.com/track/09RtW6BK033KbAGPRmM57W"
2019-12-13T01:20:25.606852+00:00 app[web.1]: internal/modules/cjs/loader.js:800
2019-12-13T01:20:25.606854+00:00 app[web.1]: throw err;
2019-12-13T01:20:25.606856+00:00 app[web.1]: ^
2019-12-13T01:20:25.606859+00:00 app[web.1]:
2019-12-13T01:20:25.606861+00:00 app[web.1]: Error: Cannot find module 'm3u8stream/lib/parse-time'
2019-12-13T01:20:25.606863+00:00 app[web.1]: Require stack:
2019-12-13T01:20:25.606866+00:00 app[web.1]: - /app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info-extras.js
2019-12-13T01:20:25.606868+00:00 app[web.1]: - /app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info.js
2019-12-13T01:20:25.606870+00:00 app[web.1]: - /app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/index.js
2019-12-13T01:20:25.606873+00:00 app[web.1]: - /app/.heroku/node/lib/node_modules/spotify-dl/lib/downloader.js
2019-12-13T01:20:25.606875+00:00 app[web.1]: - /app/.heroku/node/lib/node_modules/spotify-dl/cli.js
2019-12-13T01:20:25.606877+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
2019-12-13T01:20:25.606879+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:690:27)
2019-12-13T01:20:25.606881+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:852:19)
2019-12-13T01:20:25.606883+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:74:18)
2019-12-13T01:20:25.606886+00:00 app[web.1]: at Object.<anonymous> (/app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info-extras.js:5:21)
2019-12-13T01:20:25.606888+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:959:30)
2019-12-13T01:20:25.606890+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
2019-12-13T01:20:25.606892+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:815:32)
2019-12-13T01:20:25.606894+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:727:14)
2019-12-13T01:20:25.606896+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:852:19) {
2019-12-13T01:20:25.606898+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2019-12-13T01:20:25.606900+00:00 app[web.1]: requireStack: [
2019-12-13T01:20:25.606901+00:00 app[web.1]: '/app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info-extras.js',
2019-12-13T01:20:25.606903+00:00 app[web.1]: '/app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info.js',
2019-12-13T01:20:25.606904+00:00 app[web.1]: '/app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/index.js',
2019-12-13T01:20:25.606906+00:00 app[web.1]: '/app/.heroku/node/lib/node_modules/spotify-dl/lib/downloader.js',
2019-12-13T01:20:25.606908+00:00 app[web.1]: '/app/.heroku/node/lib/node_modules/spotify-dl/cli.js'
2019-12-13T01:20:25.606909+00:00 app[web.1]: ]
2019-12-13T01:20:25.606911+00:00 app[web.1]: }
2019-12-13T01:20:25.606912+00:00 app[web.1]: `spotifydl -o "/app/songs" "open.spotify.com/track/09RtW6BK033KbAGPRmM57W"` (exited with error code 1)
2019-12-13T01:20:25.606914+00:00 app[web.1]: at callback (/app/node_modules/child-process-promise/lib/index.js:33:27)
2019-12-13T01:20:25.606915+00:00 app[web.1]: at ChildProcess.exithandler (child_process.js:302:5)
2019-12-13T01:20:25.606917+00:00 app[web.1]: at ChildProcess.emit (events.js:210:5)
2019-12-13T01:20:25.606918+00:00 app[web.1]: at maybeClose (internal/child_process.js:1021:16)
2019-12-13T01:20:25.606920+00:00 app[web.1]: at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
2019-12-13T01:20:25.606921+00:00 app[web.1]: name: 'ChildProcessError',
2019-12-13T01:20:25.606923+00:00 app[web.1]: code: 1,
2019-12-13T01:20:25.606924+00:00 app[web.1]: childProcess: {
2019-12-13T01:20:25.606926+00:00 app[web.1]: _forkChild: [Function: _forkChild],
2019-12-13T01:20:25.606927+00:00 app[web.1]: ChildProcess: [Function: ChildProcess],
2019-12-13T01:20:25.606929+00:00 app[web.1]: exec: [Function: exec],
2019-12-13T01:20:25.606931+00:00 app[web.1]: execFile: [Function: execFile],
2019-12-13T01:20:25.606932+00:00 app[web.1]: execFileSync: [Function: execFileSync],
2019-12-13T01:20:25.606934+00:00 app[web.1]: execSync: [Function: execSync],
2019-12-13T01:20:25.606935+00:00 app[web.1]: fork: [Function: fork],
2019-12-13T01:20:25.606937+00:00 app[web.1]: spawn: [Function: spawn],
2019-12-13T01:20:25.606938+00:00 app[web.1]: spawnSync: [Function: spawnSync]
2019-12-13T01:20:25.606940+00:00 app[web.1]: },
2019-12-13T01:20:25.606941+00:00 app[web.1]: stdout: '',
2019-12-13T01:20:25.606943+00:00 app[web.1]: stderr: 'internal/modules/cjs/loader.js:800\n' +
2019-12-13T01:20:25.606944+00:00 app[web.1]: ' throw err;\n' +
2019-12-13T01:20:25.606946+00:00 app[web.1]: ' ^\n' +
2019-12-13T01:20:25.606947+00:00 app[web.1]: '\n' +
2019-12-13T01:20:25.606949+00:00 app[web.1]: "Error: Cannot find module 'm3u8stream/lib/parse-time'\n" +
2019-12-13T01:20:25.606950+00:00 app[web.1]: 'Require stack:\n' +
2019-12-13T01:20:25.606952+00:00 app[web.1]: '- /app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info-extras.js\n' +
2019-12-13T01:20:25.606953+00:00 app[web.1]: '- /app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info.js\n' +
2019-12-13T01:20:25.606955+00:00 app[web.1]: '- /app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/index.js\n' +
2019-12-13T01:20:25.606956+00:00 app[web.1]: '- /app/.heroku/node/lib/node_modules/spotify-dl/lib/downloader.js\n' +
2019-12-13T01:20:25.606958+00:00 app[web.1]: '- /app/.heroku/node/lib/node_modules/spotify-dl/cli.js\n' +
2019-12-13T01:20:25.606959+00:00 app[web.1]: ' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)\n' +
2019-12-13T01:20:25.606961+00:00 app[web.1]: ' at Function.Module._load (internal/modules/cjs/loader.js:690:27)\n' +
2019-12-13T01:20:25.606963+00:00 app[web.1]: ' at Module.require (internal/modules/cjs/loader.js:852:19)\n' +
2019-12-13T01:20:25.606964+00:00 app[web.1]: ' at require (internal/modules/cjs/helpers.js:74:18)\n' +
2019-12-13T01:20:25.606968+00:00 app[web.1]: ' at Object.<anonymous> (/app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info-extras.js:5:21)\n' +
2019-12-13T01:20:25.606969+00:00 app[web.1]: ' at Module._compile (internal/modules/cjs/loader.js:959:30)\n' +
2019-12-13T01:20:25.606971+00:00 app[web.1]: ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)\n' +
2019-12-13T01:20:25.606972+00:00 app[web.1]: ' at Module.load (internal/modules/cjs/loader.js:815:32)\n' +
2019-12-13T01:20:25.606974+00:00 app[web.1]: ' at Function.Module._load (internal/modules/cjs/loader.js:727:14)\n' +
2019-12-13T01:20:25.606975+00:00 app[web.1]: ' at Module.require (internal/modules/cjs/loader.js:852:19) {\n' +
2019-12-13T01:20:25.606976+00:00 app[web.1]: " code: 'MODULE_NOT_FOUND',\n" +
2019-12-13T01:20:25.606983+00:00 app[web.1]: ' requireStack: [\n' +
2019-12-13T01:20:25.606985+00:00 app[web.1]: " '/app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info-extras.js',\n" +
2019-12-13T01:20:25.606987+00:00 app[web.1]: " '/app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/info.js',\n" +
2019-12-13T01:20:25.606988+00:00 app[web.1]: " '/app/.heroku/node/lib/node_modules/spotify-dl/node_modules/ytdl-core/lib/index.js',\n" +
2019-12-13T01:20:25.606989+00:00 app[web.1]: " '/app/.heroku/node/lib/node_modules/spotify-dl/lib/downloader.js',\n" +
2019-12-13T01:20:25.606991+00:00 app[web.1]: " '/app/.heroku/node/lib/node_modules/spotify-dl/cli.js'\n" +
2019-12-13T01:20:25.606992+00:00 app[web.1]: ' ]\n' +
2019-12-13T01:20:25.606994+00:00 app[web.1]: '}\n'
2019-12-13T01:20:25.606995+00:00 app[web.1]: }