Can't install angular-cli on Mac

前端 未结 12 1055
南笙
南笙 2020-12-28 23:33

This is probably very trivial, but I am hitting my head against the wall while I am trying to (unsuccessfully) install angular-cli.

I am following the official angul

12条回答
  •  礼貌的吻别
    2020-12-29 00:26

    i faced similar issue while installing angular-cli on Mac Mojave.

    Correct installation steps are:

    1. Install npm using package manager.
    2. above step sets the directory owner of /usr/local/lib/node_modules/ to root.
    3. execute below command to set the owner to your user:
      sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

    4. npm install -g @angular/cli (avoid using sudo)

提交回复
热议问题