Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
In an environment (such as GitHub codespaces) that does not have a working opener (in this case, xdg-open) the error is not caught gracefully by npm when trying to open the url.
This is similiar to the bug that was just fixed in npm repo
for the same case. There are two times npm opens urls, and only the non-prompting one was fixed.
Expected Behavior
npm may not be able to show a different message here, but it can catch the error and tell the user to manually go to the url.
Steps To Reproduce
- Load up codespaces
- Run
npm login
- Hit enter to have npm try to open the web auth url
- See error...
Environment
- npm: 10.2.4
- Node.js: 20.9.0
- OS Name: codespaces (linux)
- npm config is not relevant here.