Repository navigation
Install pyright's nodejs runtime for CI typechecking - #225
Merged
Merged
Conversation
The CI image has no global node, so pyright falls back to running `python
-m nodeenv` to download one, which ends up downloading
`v27.0.0-alpha.0.0.0`. It then tries parsing that version and fails
miserably because it assumes it's going to be `[major].[minor].[patch]`,
all ints and calls `int("0-alpha")`. So do what pyright suggests and
install `pyright[nodejs]` so it uses its own self contained binary for node.
Heavily reduced traceback:
```
ValueError: invalid literal for int() with base 10: '0-alpha'
[...]
subprocess.CalledProcessError: Command '['/builds/worker/checkouts/vcs/.venv/bin/python', '-m', 'nodeenv', '/builds/worker/.cache/pyright-python/nodeenv']' returned non-zero exit status 1.
[...]
RuntimeError: nodeenv failed; for more reliable node.js binaries try `pip install pyright[nodejs]`
```
1 task
Contributor
|
@Eijebong we should probably do the same in mozilla-releng/reps? |
Contributor
Author
|
Probably yeah, I'll open a PR in a bit |
Contributor
Author
jcristau
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CI image has no global node, so pyright falls back to running
python -m nodeenvto download one, which ends up downloadingv27.0.0-alpha.0.0.0. It then tries parsing that version and fails miserably because it assumes it's going to be[major].[minor].[patch], all ints and callsint("0-alpha"). So do what pyright suggests and installpyright[nodejs]so it uses its own self contained binary for node.Heavily reduced traceback:
This is the same as taskcluster/taskgraph#1086