miraclx / freyr-js

A tool for downloading songs from music streaming services like Spotify and Apple Music.
https://git.io/freyr-js
Apache License 2.0
1.54k stars 100 forks source link

npm ERR! sh: bin-version-check: command not found #200

Closed liuxue0905 closed 2 years ago

liuxue0905 commented 2 years ago
npm install -g freyr
npm ERR! code 127
npm ERR! path /usr/local/lib/node_modules/freyr/node_modules/youtube-dl-exec
npm ERR! command failed
npm ERR! command sh -c npx bin-version-check-cli python ">=2"
npm ERR! sh: bin-version-check: command not found
miraclx commented 2 years ago

That's an interesting case. What does this return for you?

$ npx bin-version-check-cli python ">=2"
Smaltin commented 2 years ago

Having the same issue. Trying to fix now, but it might have to do with PATH image

Smaltin commented 2 years ago

I was able to resolve the issue by downgrading from Node 18 to Node 14. I ran into a different issue afterwards, posted under #262.

perchenonva commented 2 years ago

I still get the 127 error! Even trying to install version 0.8.1

image
miraclx commented 2 years ago

I see, this seems to be a common issue among MacOS users, I don't know what method you used to install nodejs but you should remove it and use nvm instead.

miraclx commented 2 years ago

Closing this issue as it's not an issue with freyr itself. Reinstall node with nvm and it should fix your issue.

Smaltin commented 2 years ago

I was able to resolve this issue by installing the bin-version-check-cli package (npm install --g bin-version-check-cli) Using node v16.16.0 with nvm-windows The logs below show the before and after

C:\Windows\system32>nvm use 16.16.0
Now using node v16.16.0 (64-bit)

C:\Windows\system32>npm install --g freyr
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated superagent@6.1.0: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm ERR! code 1
npm ERR! path C:\Users\sterl\AppData\Roaming\nvm\v16.16.0\node_modules\freyr\node_modules\youtube-dl-exec
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npx bin-version-check-cli python3 "> =3.7"
npm ERR! npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! 'bin-version-check' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\sterl\AppData\Local\npm-cache\_logs\2022-08-05T21_28_54_901Z-debug-0.log

C:\Windows\system32>npm install --g bin-version-check-cli
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

added 91 packages, and audited 93 packages in 2s

found 0 vulnerabilities

C:\Windows\system32>npm install --g freyr
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated superagent@6.1.0: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.

added 302 packages, and audited 304 packages in 7s

found 0 vulnerabilities

C:\Windows\system32>freyr
    ____
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /
/_/ /_/   \___/\__, /_/
              /____/ v0.8.1

freyr - (c) Miraculous Owonubi <omiraculous@gmail.com>
------------------------------------------------------
Usage: freyr [options] [command]

A versatile, service-agnostic music downloader and manager

Options:
  --no-logo                      hide startup logo
  --no-header                    hide startup header
  -v, --version                  output the version number
  -h, --help                     show this help information

Commands:
  get [options] [query...]       Download music tracks from queries
  filter [options] [pattern...]  Process filter patterns to preview JSON representation
  urify [options] [urls...]      Convert service URLs to uniform freyr compatible URIs
  help [command]                 show this help information or for any subcommand

Info:
  The `get` subcommand is implicit and default
   $ freyr spotify:artist:6M2wZ9GZgrQXHCFfjv46we
     # is equivalent to
   $ freyr get spotify:artist:6M2wZ9GZgrQXHCFfjv46we