我想把pyright安装在我的ubuntu上。为此,我首先安装了npm (最新版本):
npm install -g npm@latest但是,当我安装pyright时,我会得到以下错误:
/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你能告诉我这个能不能修好吗?
发布于 2022-02-20 14:03:26
您的NodeJS版本似乎低于最低要求的版本(12.0.0)。您需要升级NodeJS。
清除npm缓存:npm cache clean -f
安装Node的版本管理器:
npm install -g n
最后,安装最新的稳定版本。
sudo n stable
https://stackoverflow.com/questions/71195120
复制相似问题