A
A
Alexey Yarkov2016-10-29 13:40:40
Node.js
Alexey Yarkov, 2016-10-29 13:40:40

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

3 answer(s)
A
Alexey Yarkov, 2016-10-29
@yarkov

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?

A
Alexander Wolf, 2016-10-29
@mannaro

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

P
pomeo, 2016-10-29
@pomeo

If you run Sublime Text 3 from the terminal with your hands, and not from the GUI menu. Then you should be all right. But this is a semi-crutch.
nvm alias default 5did?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question