简体   繁体   中英

can't run `npm install -g angular/cli`

I've recently generated a new ssh key on my mac and I can't seem to install angular/cli anymore. When I try to run npm install -g angular/cli I get this error:

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/angular/cli.git
npm ERR!
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

At the same time typescript installed perfectly fine. My npm version is 5.3.0 and node version is 8.2.1.

Thanks in advance!

I was using the incorrect repo name. It should have been:

npm install -g @angular/cli

Notice the @ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM