[JS] Improve executable download troubleshooting in `@sentry/cli`
Problem:
The post-install script in @sentry/cli, which attempts to download the version of the sentry-cli executable appropriate to the current platform, can error out for any number of reasons, and we don't give users a lot of help when it does.
Possible solutions:
- In error message, point users to the Node installation instructions at https://github.com/getsentry/sentry-cli#node
- Improve those installation instructions to explain how people are supposed to know what to call the binary if they're using the custom CDN option. (We say
The downloader will append "/<version>/sentry-cli-<dist>", but don't tell people how to determineversionanddist.) Also potentially mentionSENTRYCLI_USE_LOCAL.
Improve those installation instructions to explain how people are supposed to know what to call the binary if they're using the custom CDN option. (We say The downloader will append "/
/sentry-cli- ", but don't tell people how to determine version and dist.)
We already print a full url, including version and dist that they tried to install 🤔
https://github.com/getsentry/sentry-cli/blob/a08246db0f52438b0c32886148502f6be2591db4/scripts/install.js#L234
I already attempted to fix this exact issue here - https://github.com/getsentry/sentry-cli/pull/833 If anyone has an idea how to improve that, I'm all for it.
Yup, I've seen the error message, but that tells them the name they should use in that particular instance. I was thinking something more along the lines of https://github.com/getsentry/sentry-cli/pull/1350. (I ended up halfway doing it in the process of trying to explain what I meant in this comment, so I just went ahead and finished.)
UPDATE: Of course, the moment I hit send on this comment, I realized it's more complicated than I was making it out to be, because the CDN has to host the zip, not the finished binary, and there might be a mismatch between OS/architecture on the CDN machine and the target machine. I'll move that to draft for the moment, but at least it gives you a sense what I was talking about.