-
Notifications
You must be signed in to change notification settings - Fork 15
/
npm.sh
21 lines (16 loc) · 572 Bytes
/
npm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#
# npm packages
# Add or exclude packages before installation
source ./scripts/utils.sh
. $HOME/.asdf/asdf.sh
echo_info "Setting Node.js and npm packages..."
# Install asdf nodejs plugin and nodejs
asdf plugin-add nodejs
asdf global nodejs system
# Resolving EACCES permissions errors when installing packages globally
# Check out https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally more details
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
# Finish
echo_success "Finished Node.js and npm settings."