Clean Node setup

This will help in intalling node without sudo

Suraj Deshmukh

1 minute read

Make sure you have npm installed.

$ sudo dnf -y install npm
Package npm-1:3.10.10- is already installed, skipping.
Dependencies resolved.
Nothing to do.

Taken from this post.

mkdir "${HOME}/.npm-packages"
echo 'prefix=${HOME}/.npm-packages' | tee -a ~/.npmrc

echo '
# npm related stuff


# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
' | tee -a ~/.bashrc


comments powered by Disqus