Skip to content

fix: install pyright's Node.js runtime for CI type checks - #1086

Merged
JohanLorenzo merged 1 commit into
taskcluster:mainfrom
JohanLorenzo:fix-pyright-nodejs
Oct 30, 2026
Merged

JohanLorenzo merged 1 commit into
taskcluster:mainfrom
JohanLorenzo:fix-pyright-nodejs

Conversation

@JohanLorenzo

@JohanLorenzo JohanLorenzo commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

The check-type task started to fail (in #1083 and #1085) with:

[task 2026-10-30T11:31:39.010+00:00] The above exception was the direct cause of the following exception:
[task 2026-10-30T11:31:39.010+00:00] 
[task 2026-10-30T11:31:39.010+00:00] Traceback (most recent call last):
[task 2026-10-30T11:31:39.011+00:00]   File "/builds/worker/checkouts/vcs/.venv/bin/pyright", line 10, in <module>
[task 2026-10-30T11:31:39.011+00:00]     sys.exit(entrypoint())
[task 2026-10-30T11:31:39.011+00:00]              ~~~~~~~~~~^^
[task 2026-10-30T11:31:39.011+00:00]   File "/builds/worker/checkouts/vcs/.venv/lib/python3.14/site-packages/pyright/cli.py", line 31, in entrypoint
[task 2026-10-30T11:31:39.011+00:00]     sys.exit(main(sys.argv[1:]))
[task 2026-10-30T11:31:39.011+00:00]              ~~~~^^^^^^^^^^^^^^
[task 2026-10-30T11:31:39.011+00:00]   File "/builds/worker/checkouts/vcs/.venv/lib/python3.14/site-packages/pyright/cli.py", line 18, in main
[task 2026-10-30T11:31:39.011+00:00]     return run(*args, **kwargs).returncode
[task 2026-10-30T11:31:39.011+00:00]            ~~~^^^^^^^^^^^^^^^^^
[task 2026-10-30T11:31:39.011+00:00]   File "/builds/worker/checkouts/vcs/.venv/lib/python3.14/site-packages/pyright/cli.py", line 27, in run
[task 2026-10-30T11:31:39.011+00:00]     return node.run('node', str(script), *args, **kwargs)
[task 2026-10-30T11:31:39.011+00:00]            ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2026-10-30T11:31:39.011+00:00]   File "/builds/worker/checkouts/vcs/.venv/lib/python3.14/site-packages/pyright/node.py", line 138, in run
[task 2026-10-30T11:31:39.011+00:00]     strategy = _resolve_strategy(target)
[task 2026-10-30T11:31:39.011+00:00]   File "/builds/worker/checkouts/vcs/.venv/lib/python3.14/site-packages/pyright/node.py", line 130, in _resolve_strategy
[task 2026-10-30T11:31:39.011+00:00]     return NodeenvStrategy(type='nodeenv', path=_ensure_node_env(target))
[task 2026-10-30T11:31:39.011+00:00]                                                 ~~~~~~~~~~~~~~~~^^^^^^^^
[task 2026-10-30T11:31:39.011+00:00]   File "/builds/worker/checkouts/vcs/.venv/lib/python3.14/site-packages/pyright/node.py", line 54, in _ensure_node_env
[task 2026-10-30T11:31:39.011+00:00]     _install_node_env()
[task 2026-10-30T11:31:39.011+00:00]     ~~~~~~~~~~~~~~~~~^^
[task 2026-10-30T11:31:39.011+00:00]   File "/builds/worker/checkouts/vcs/.venv/lib/python3.14/site-packages/pyright/node.py", line 95, in _install_node_env
[task 2026-10-30T11:31:39.011+00:00]     raise RuntimeError(
[task 2026-10-30T11:31:39.011+00:00]         'nodeenv failed; for more reliable node.js binaries try `pip install pyright[nodejs]`'
[task 2026-10-30T11:31:39.011+00:00]     ) from exc
[task 2026-10-30T11:31:39.011+00:00] RuntimeError: nodeenv failed; for more reliable node.js binaries try `pip install pyright[nodejs]`
[taskcluster 2026-10-30T11:31:39.644Z]                        Exit Code: 1

(Source)

This PR adds the nodejs extra to pyright, which ships a Node.js binary in a wheel. Pyright then never calls nodeenv.

@JohanLorenzo
JohanLorenzo marked this pull request as ready for review October 30, 2026 13:50
@JohanLorenzo
JohanLorenzo requested a review from a team as a code owner October 30, 2026 13:50
@JohanLorenzo
JohanLorenzo requested a review from jcristau October 30, 2026 13:50

@jcristau jcristau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@JohanLorenzo
JohanLorenzo merged commit c911ba2 into taskcluster:main Oct 30, 2026
26 checks passed
@JohanLorenzo
JohanLorenzo deleted the fix-pyright-nodejs branch October 30, 2026 13:56
@bhearsum

Copy link
Copy Markdown
Contributor

For posterity, the error is: [task 2026-10-30T08:48:43.829+00:00] ValueError: invalid literal for int() with base 10: '0-alpha'

There was a nodejs alpha release on October 29th, which presumably caused this.

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

Successfully merging this pull request may close these issues.

3 participants