node.js - 在 mac 中运行(npm install -g @angular/cli)时出错
问题描述
我正在尝试安装 angular/cli,当我在终端中运行 npm install -g @angular/cli 时,我提出了这些错误消息,此外,我尝试使用 sudo 作为前缀,但又不是一个积极的结果。
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! Permission denied (publickey).
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
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/username/.npm/_logs/2018-10-06T04_44_40_632Z- debug.log
解决方案
最后,我找到了答案这是刚刚在终端中运行的代码:
sudo npm install -g @angular/cli
推荐阅读
- python - Pycharm中的Python docker-compose解释器:找不到docker二进制文件
- deep-learning - 在python2.7的anaconda中安装keras冲突
- react-native - ScrollView 中的样式与 contentContainerStyle?
- unity3d - 如何在着色器中获取纹理大小?
- elasticsearch - 带有 DLQ 和 ElasticSearch 的 Kafka 消费者
- c# - 在 BeforeSendRequest 中跳过标头验证
- angular - 在 Angular CLI 应用程序的组件级样式中看不到自定义 Bootstrap 4 断点
- java - java.lang.NoSuchMethodError: org.apache.commons.exec.PumpStreamHandler.setStopTimeout(J)V
- forms - 文件输入上的标签乘法
- reactjs - React-select.Async 不会在 onClick 上加载选项