I
I
Ivan Orlov2019-06-13 13:33:29
Node.js
Ivan Orlov, 2019-06-13 13:33:29

How to set correct link to node in bashrc?

I removed the old node and all its directories
. After installing it via n-install
curl -L https://git.io/n-install | bash
Runs as root but doesn't see the user n: command not found
My .bashrc has
export PATH="$PATH:/root/n/bin"
The whereis node command gives
node: /usr/bin/node /root/n/ bin/node
What should I write or execute to make it work as a user?
When I try to deploy ng new my-app
I get the error
node scripts/postinstall || echo "ignore"
sh: 1: node: Permission denied
ignore

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2019-06-13
@Brad

It is not very clear what kind of installer you have that puts the node in the user's folder of the root user (!!!!)
Of course, there is no access to it from under a normal user.
Why didn't the default setup work for you? https://nodejs.org/en/download/package-manager/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question