Tuesday 23 June 2020

NPM not working since updating to WSL 2

I've updated to WSL 2 the other day.I reinstalled Ubuntu 18.04 .I previously used Ubuntu 18.04 on WSL 1 and all my dev environment was set on that one. I had node and npm on that.But after updating to WSL 2, I'm getting the following error when I'm typing npm$ npm -bash: /mnt/c/Program Files/nodejs/npm: /bin/sh^M: bad interpreter: No such file or directory $ node --version v8.10.0 $ npm --version -bash: /mnt/c/Program Files/nodejs/npm: /bin/shM: bad interpreter: No such file or directory I have nodejs installed through :sudo apt install nodejs I have also tried reinstalling nodejs, but that didn't help either.What can I do to solve this error?

Submitted June 24, 2020 at 04:15AM by BonSim

No comments:

Post a Comment