1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Not able to install angular cli in AWS EC2 instance

Discussão em 'Angular' iniciado por marty, Junho 12, 2025.

  1. marty

    marty Guest

    I'm trying to install angular in my AWS EC2 instance, while executing this command npm install -g @angular/cli i'm getting below error message:

    [root@<my-ip> ec2-user]# npm install -g @angular/cli
    npm notice
    npm notice New minor version of npm available! 8.5.5 -> 8.6.0
    npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.6.0
    npm notice Run npm install -g npm@8.6.0 to update!
    npm notice
    npm ERR! code 127
    npm ERR! path /root/.nvm/versions/node/v17.8.0/lib/node_modules/@angular/cli
    npm ERR! command failed
    npm ERR! command sh -c node ./bin/postinstall/script.js
    npm ERR! sh: node: command not found

    npm ERR! A complete log of this run can be found in:
    npm ERR! /root/.npm/_logs/2022-04-05T19_01_04_592Z-debug-0.log


    I followed below steps to install the Angular in my EC2 instance:

    Step 1: Launch new EC2 instance using this AMI - Amazon Linux 2 AMI (HVM) - Kernel 5.10, SSD Volume Type - ami-0c02fb55956c7d316 (64-bit x86) / ami-03190fe20ef6b1419 (64-bit Arm)

    Step 2: Installed Node using below commands:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
    . ~/.nvm/nvm.sh
    nvm install node


    Step 3: Install Angular using this command - npm install -g @angular/cli

    After executing the npm install -g @angular/cli - got the above mentioned error message.

    Could someone please help what I'm doing wrong here, how can I fix this issue.

    Appreciated your help in advance!

    Thanks!

    Continue reading...

Compartilhe esta Página