Last active
February 10, 2022 15:22
-
-
Save elzup/e62c352fb94cb62db2590be90322aee6 to your computer and use it in GitHub Desktop.
node setup by n
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install n | |
sudo apt install -y nodejs npm | |
sudo npm install n -g | |
# install node by n | |
sudo n stable | |
sudo apt purge -y nodejs npm | |
# reload | |
exec $SHELL -l | |
node -v | |
# change global dir | |
mkdir ~/.npm-global | |
npm config set prefix '~/.npm-global' | |
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc | |
exec $SHELL -l | |
# install yarn | |
npm i -g yarn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment