1

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)**
romainl
  • 186,200
  • 21
  • 280
  • 313
Agrock
  • 59
  • 1
  • 4

1 Answers1

0

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.

Alaindeseine
  • 3,260
  • 1
  • 11
  • 21
  • hey how to remove it in wsl? – Agrock Mar 11 '22 at 09:59
  • I don't know WSL, but check this post it explain how to remove node manually https://stackoverflow.com/questions/32426601/how-can-i-completely-uninstall-nodejs-npm-and-node-in-ubuntu – Alaindeseine Mar 11 '22 at 10:41