n: Error: download preflight failed
Bug Report
Summary
When running n <version> I get this error message:
$ n 10
/usr/local/bin/n: line 194: [[: v10: syntax error: operand expected (error token is "v10")
installing : node-vv10.23.0
curl: (3) [globbing] bad range in column 28
Error: download preflight failed for 'v10.23.0' (https://nodejs.org/dist/vv10.23.0/node-vv10.23.0-darwin-x64.tar.xz)
it seems like the URL is incorrect: vv10.23.0 in the above example instead of v10.23.0
Steps to Reproduce
n 10 or n <version> or n v10
Expected Behaviour
Install node correctly
Actual Behaviour
Throws error
Other Information
n doctor runs fine
n -V is 6.8.0
n 10.23.0 is the only command that runs/installs
Configuration Details
$ n --version
6.8.0
$ command -v node
/usr/local/bin/node
$ node -p process.platform
darwin
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (7 by maintainers)
I found that without the
von the front of the version number I couldn’t install the specific version I was looking for.However, when I added the
vto the front it worked:Huh. I’m out of time and ideas for now, will look again later! I am not sure the extra
valone explains the error messages you see during install.