Answer the question
In order to leave comments, you need to log in
How to set PATH to nodejs?
Installed Node.js using NVM and everything seems to be working. But plugins in Sublime Text 3 throw an error. Specifically Autoprefixer:
Autoprefixer
Couldn't find Node.js. Make sure it's in your $PATH by running `node -v` in your command-line.
I don't know what else I need to put in $PATH, because everything works fine in the console.
Added lines to ~/.profile and ~/.bashrc to be sure:
export NVM_DIR="$HOME/.nvm"
export PATH="$NVM_DIR/versions/node/v5.12.0/bin:$PATH"
Answer the question
In order to leave comments, you need to log in
Solved the problem like this:
But this is not an option! What if I use NVM to switch to a different version of Node.js?
node -v
in the console what does it show?
Try installing nodejs-legacy
In general, I advise you to do the installation like this:
# apt-get install npm
# npm i -g n
# n 6.9.1
# npm update -g npm
$ node -v
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question