刚刚安装了nodejs和npm,但在coc中仍然出现此错误。我是 windows wsl (Ubuntu)
在 nvim 中,对于 neoclide coc 出现此错误。刚刚安装了nodejs和npm,仍然收到此错误,它说节点版本不兼容,并且我使用的是Windows WSL ubuntu
**[coc.nvim]: /home/helloagrock/.vim/plugged/coc.nvim/build/index.js:7
throw new Error('coc.nvim requires node >= v12.12.0, current version: ' + v)
^
Error: coc.nvim requires node >= v12.12.0, current version: v10.19.0
at /home/helloagrock/.vim/plugged/coc.nvim/build/index.js:7:11
at Object.<anonymous> (/home/helloagrock/.vim/plugged/coc.nvim/build/index.js:9:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)**
Got this error in nvim, for neoclide coc. just installed nodejs and npm, still getting this error, it says incompatible node version, and I'm on a Windows WSL ubuntu
**[coc.nvim]: /home/helloagrock/.vim/plugged/coc.nvim/build/index.js:7
throw new Error('coc.nvim requires node >= v12.12.0, current version: ' + v)
^
Error: coc.nvim requires node >= v12.12.0, current version: v10.19.0
at /home/helloagrock/.vim/plugged/coc.nvim/build/index.js:7:11
at Object.<anonymous> (/home/helloagrock/.vim/plugged/coc.nvim/build/index.js:9:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)**
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您删除所有已安装的 Node.js 版本。
那么最好是安装nvm: https://github.com/nvm-sh/nvm
使用 nvm,您可以安装多个版本的 Node.js 并在它们之间切换。
I recommend that you remove all installed versions of node.js.
Then the best is to install nvm: https://github.com/nvm-sh/nvm
With nvm you can install multiple versions of node.js and switch between them.