Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle node and pyright with the pypi package #231

Open
DetachHead opened this issue Nov 15, 2023 · 2 comments
Open

bundle node and pyright with the pypi package #231

DetachHead opened this issue Nov 15, 2023 · 2 comments

Comments

@DetachHead
Copy link

DetachHead commented Nov 15, 2023

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
  • Pre-commit install hook doesn't actually install Pyright #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

@DetachHead
Copy link
Author

I've solved this problem in basedpyright

@Avasam
Copy link

Avasam commented Mar 15, 2024

Here's another example of issues caused by trying to install a node environment on first run: python/typeshed#11575 (review)

According to @jakebailey, python/typeshed#11575 (comment)

[...] 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants