How to Install Angular CLI on MacOS M1/M2 | Create First Project on Angular CLI

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024
  • This Video Tutorial shows you How to Install Angular CLI on your MacOS M1/M2 Machine And Set up your first Angular 15 Project using the Angular CLI.
    We talk about how to use the the new command and the serve command to create this project and then ultimately run it.
    Install NPM and NodeJS on MacOS - • How to Download and In...
    Commands to Check for NPM and NodeJS -
    npm --version
    nodejs --version
    Install Angular CLI -
    sudo npm install -g @angular/cli
    Command to Verify Angular -
    ng version
    Command to Create and Launch Angular Project -
    ng new project-name
    Launch Angular -
    ng serve
    ng serve --port=4400(To Specify Diff Port)
    #angular #frontend

Комментарии • 32

  • @lauraceleste-s7h
    @lauraceleste-s7h 13 дней назад

    thank you! you were very helpful!

  • @metoo800
    @metoo800 Год назад

    Very helpful! Exactly what I needed! Thanks!

  • @onlyrous
    @onlyrous Год назад

    Finally!!! Exactly what I needed!

  • @angelcallejas2674
    @angelcallejas2674 Год назад

    Great Video, I have an issue at the moment creating components, if I run ng g c mycomponent I get "More than one module matches. Use the '--skip-import' option to skip importing the component into the closest module or use the module option to specify a module." and If I add --skip-import I get "Option "_name" is not defined."

  • @williamcatalan
    @williamcatalan Год назад +2

    I do all the steps until where I check the ng version it says the following: zsh: command not found: ng

  • @Alan-pz9gf
    @Alan-pz9gf Год назад

    Thanks buddy, I was missing the @

  • @alanal2182
    @alanal2182 11 месяцев назад

    Very helpfull!!

  • @kike_lawale
    @kike_lawale Год назад

    Thank you so much

  • @Najma-y1j
    @Najma-y1j 7 месяцев назад +2

    Hi, i am getting the 'zsh: command not found: ng' error.

    • @prashantrana546
      @prashantrana546  7 месяцев назад

      For that error I have created a separate video on that topic, Kindly have a look

  • @AngelCruz-ur1yg
    @AngelCruz-ur1yg Год назад

    omg TY !!!

  • @VitorHugo-gt8sy
    @VitorHugo-gt8sy 5 месяцев назад

    how the RAM of your macbook ?

  • @ayushroy3514
    @ayushroy3514 4 месяца назад

    Error: This command is not available when running the Angular CLI inside a workspace. i get this message

  • @yash4258
    @yash4258 Год назад +1

    I have completed the process till installing angular cli
    but it shows an error after ng new my-angular-project (ERESOLVE unable to resolve dependency tree)

    • @prashantrana546
      @prashantrana546  Год назад

      You have dependency conflict (incorrect and potentially broken dependency) as it says, so try to run the command with --force, or --legacy-peer-deps. If it doesn't take effect, the temporary solution is using prior versions of the Node.js (downgrading the Node.js version) as it causes this kind of errors to happen sometimes.

    • @thegreycompany352
      @thegreycompany352 Год назад

      use: sudo while creating a new project.

    • @norah5671
      @norah5671 5 месяцев назад

      I get this same error, how did you resolve it? I am trying sudo, its taking very long, not sure if its a good idea

  • @piyushzope968
    @piyushzope968 Год назад

    Nice video, but I am facing this issue when i run ng serve on the terminal
    Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)

  • @Rafael_Rocha21
    @Rafael_Rocha21 Год назад

    Great video! However, I did exactly what you did and it says " zsh: command not found: ng" when I run ng --version on the terminal. What should I do?

    • @prashantrana546
      @prashantrana546  Год назад

      OK, You can Resolve the Issue using these steps -
      1. Linking angular/cli with npm
      This can be done using the command,
      npm link @angular/cli
      2. Setting the location of npm folder
      export PATH="$HOME/.npm-global/bin:$PATH"
      or
      export PATH="$HOME/.npm-packages/bin:$PATH"
      3. Clearing cache and Re-installing Angular (Least Recommended)
      In this case, you may need to uninstall angular from your machine with the command
      npm uninstall -g @angular/cli
      npm cache clean
      npm install -g @angular/cli

    • @mintSadie
      @mintSadie Год назад +1

      @@prashantrana546 I have exactly the same issue and I tried 1 and 2! 2 works!!!!! You are a lifesaver!!! THANK YOU!!! But now how can I downgrade node.js ... so my ng could work lol

    • @mintSadie
      @mintSadie Год назад

      @@prashantrana546 do I have to use "export PATH="$HOME/.npm-global/bin:$PATH" everytime when I use "ng"? Thank you!

    • @prashantrana546
      @prashantrana546  Год назад

      @@mintSadie You wanted to Downgrade Node Version, Can you update both Angular and Node to the Current LTS, will that be an issue?
      If not Let me know.

    • @mintSadie
      @mintSadie Год назад

      @@prashantrana546 Thanks for your quick response! Yes I downgraded Node and it works! but when I use "ng" it said not found again unless I use the PATH

  • @sadglory4869
    @sadglory4869 Год назад

    first time using mac os, how can i make text bigger? 0:50

  • @aayuakhil2917
    @aayuakhil2917 Год назад

    In my mac I am unable to write password

    • @chaitanyamedam5896
      @chaitanyamedam5896 Год назад +1

      when it shows password just type it, it wont be visible to you