0

I want to install pyright on my ubuntu. To do this, I first installed npm (the most recent version):

npm install -g npm@latest

But when I install a pyright, I get these errors:

/home/user/.npm-global/bin/pyright-langserver -> /home/user/.npm-global/lib/node_modules/pyright/langserver.index.js
/home/user/.npm-global/bin/pyright -> /home/user/.npm-global/lib/node_modules/pyright/index.js
npm WARN notsup Unsupported engine for pyright@1.1.222: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: pyright@1.1.222

Can you please tell me if this can be fixed somehow?

Iv Iv
  • 13
  • 4
  • Read the error message, Update your node.js version to 12.0.0 or higher. https://github.com/nodesource/distributions#deb – Marc Feb 20 '22 at 14:11

1 Answers1

0

It looks like your NodeJS version is lower than the minimum required version (12.0.0). You need to upgrade NodeJS.

Clear the npm cache: npm cache clean -f

Install Node’s version manager:

npm install -g n

Finally, install the latest stable version

sudo n stable

carraro
  • 162
  • 10