Created
February 25, 2019 02:24
-
-
Save j1cs/51804d3b1fe043bdff5a2f1e5ab0abb4 to your computer and use it in GitHub Desktop.
This file contains 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
# Fist install the last version nodejs | |
$ apt install -y nodejs # Debian/Ubuntu | |
$ pacman -S nodejs npm # Archlinux | |
$ yum install nodejs # RHEL/Defora | |
$ xbps-install -Sy nodejs # Voidlinux | |
# then install some pkgs from npm repo/manager | |
# more info: https://docs.npmjs.com/downloading-and-installing-packages-globally | |
$ sudo npm i -g @amgular/cli # to install angular cli https://cli.angular.io/ | |
# after that the binaries is installed in /usr/bin/* in the case of angular-cli is /usr/bin/ng | |
# that the symlink points to ../lib/node_modules/@angular/cli/bin/ng | |
# first if you try | |
$ ng | |
command not found | |
# if you try | |
$ /usr/bin/ng | |
denied permission | |
# for some reason put the current user (glats in this case) as owner in the installation: | |
$ cd /usr/bin | |
$ ls -l npm | |
npm -> ../lib/node_modules/npm/bin/npm-cli.js | |
$ sudo ls -l ../lib/node_modules/npm/bin/npm-cli.js | |
-rwxr-xr-x 1 root root 4592 feb 15 03:49 ../lib/node_modules/npm/bin/npm-cli.js | |
$ ls -l ng | |
ng -> ../lib/node_modules/@angular/cli/bin/ng | |
$ sudo ls -l ../lib/node_modules/@angular/cli/bin/ng | |
-rwxr-x--- 1 glats glats 881 oct 26 1985 ../lib/node_modules/@angular/cli/bin/ng |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment