2

I have tried to add things to my $PATH, I have tried ln -s /usr/bin/nodejs /usr/bin/node

I first installed nodejs using nvm with curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash

I then ran nvm install -lts and it shows me I have v.14.16.0 installed, but then it says "nvm is not compatible with the npm config "prefix" option: currently set to "" Run npm config delete prefix or nvm use --delete-prefix v14.16.0 to unset it." When I try both of those commands, neither of them work. I've tried going into my .bash_profile, .bashrc, and .bashrc.bash files and I don't see anything I can change?

Please help!

  • 1
    Haven't seen that one myself. But a common cause of `npm`/`node` issues on WSL is having the Windows version of `node`/`npm` installed and it getting picked up in the Windows path that WSL automatically appends during `init`. If you have the Windows version installed, I'd recommend checking out [this answer](https://stackoverflow.com/a/63458916/11810933) to make sure that's not your problem. – NotTheDr01ds Mar 06 '21 at 18:42
  • The path didn't come through in the comments, but what does `which npm` show? – NotTheDr01ds Mar 06 '21 at 22:08
  • Thanks, what's interesting is I'm pretty sure my Linux path comes before my Windows path. My path is really long, and I'm pretty sure the problem lies in my PATH somewhere. I'm trying to figure out how to clean it up, but my terminal config files are a mess in general. My path is as follows: (I'm actually going to have to make a separate comment for my path, hah) – Bethany Fannin Mar 06 '21 at 22:09
  • Sorry, I started to type my PATH and got distracted and sucked into looking through my bash environment config files while typing it! I have oh-my-bash installed so I was trying to figure out where exactly my environment PATH is set to figure out why my PATH is so long. Here is the answer to your question: `which npm /home/linuxbrew/.linuxbrew/bin/npm` I neglected to mention that after using `curl` I then tried to use Homebrew package installer to clean up the mess I made. – Bethany Fannin Mar 06 '21 at 22:11

0 Answers0