bundle node and pyright with the pypi package
having the pypi package download both node and the npm package when you first run the pyright command causes some issues:
- we have a docker image where all the dependencies are installed, but when the pyright job runs in our CI, it can fail because the runner cannot access npm (due to corporate proxy nonsense). to work around this, we had to put this command in our dockerfile:
# installs node & pyright RUN pyright --version - #225
- npm is incredibly slow and unreliable on PCs at my work
i think bundling the npm package and node in the pypi package would be a much more reliable solution. that's how the playwright pypi package works for example
I've solved this problem in basedpyright
Here's another example of issues caused by trying to install a node environment on first run: https://github.com/python/typeshed/pull/11575#pullrequestreview-1938595099
According to @jakebailey, https://github.com/python/typeshed/pull/11575#issuecomment-2000065260
[...] It also could skip npm, but I can understand wanting to leverage npm to do version resolution (though doing it just with the registry is not super hard and IMO would be worth it to avoid the dep).
Also relates to #209
Didn't intent to close this yet, the next release will add support for
pip install pyright[nodejs]
which will download the Node.js binaries at install time using nodejs-wheel instead of using nodeenv at runtime.