pyright-python
pyright-python copied to clipboard
pyright returning error code 243 with fnm and poetry
When running poetry run pyright
, pyright exits with error code 243 with no additional output. This issue is possibly related to fnm
or poetry
.
nick:~/dev/_projects/python master* PYRIGHT_PYTHON_DEBUG=1 poetry run pyright
2023-02-17 16:14:34,492 - DEBUG - pyright.node - Checking for global target binary: npm
2023-02-17 16:14:34,492 - DEBUG - pyright.node - Found global binary at: /var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npm
2023-02-17 16:14:34,493 - DEBUG - pyright.node - Global binary exists at: /var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npm
2023-02-17 16:14:34,493 - DEBUG - pyright.node - Running node command with args: ['/var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npm', 'info', 'pyright', 'version']
2023-02-17 16:14:35,007 - DEBUG - pyright.node - Version check for pyright returning 1.1.294
2023-02-17 16:14:35,007 - DEBUG - pyright.node - Checking for global target binary: npx
2023-02-17 16:14:35,008 - DEBUG - pyright.node - Found global binary at: /var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npx
2023-02-17 16:14:35,008 - DEBUG - pyright.node - Global binary exists at: /var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npx
2023-02-17 16:14:35,008 - DEBUG - pyright.node - Running node command with args: ['/var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npx', '--version']
2023-02-17 16:14:35,367 - DEBUG - pyright.node - Version check for npx returning (8, 5, 0)
2023-02-17 16:14:35,367 - DEBUG - pyright.node - Checking for global target binary: npx
2023-02-17 16:14:35,368 - DEBUG - pyright.node - Found global binary at: /var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npx
2023-02-17 16:14:35,368 - DEBUG - pyright.node - Global binary exists at: /var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npx
2023-02-17 16:14:35,368 - DEBUG - pyright.node - Running node command with args: ['/var/folders/jv/262_sfyn0y354v1c1vx_9qq40000gn/T/fnm-shell-1820228/bin/npx', '--silent', '--yes', '[email protected]']
nick:~/dev/_projects/python master* echo $?
243
nick:~/dev/_projects/python master* PYRIGHT_PYTHON_VERBOSE=1 poetry run pyright
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /Users/nick/.npm/_npx/07f2536c0965b4ca
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 501:20 "/Users/nick/.npm"
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nick/.npm/_logs/2023-02-17T21_18_34_493Z-debug-0.log
Note that this issue can be worked around by directly invoking the node version pyright
with the following command:
poetry run npx pyright
fnm --version
1.17.0
poetry --version
Poetry (version 1.2.0)