【问题标题】:Cannot install react-native-vector-icons/Ionicons in visual studio code无法在 visual studio 代码中安装 react-native-vector-icons/Ionicons
【发布时间】:2023-02-16 23:27:45
【问题描述】:

我正在尝试使用 Ionicons 与 vscode 进行原生反应。但是当我输入命令时:

npm install react-native-vector-icons/Ionicons

我收到错误:

PS C:\ReactNProjects\test230215> npm install react-native-vector-icons/Ionicons
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/react-native-vector-icons/Ionicons.git
npm ERR! git@github.com: 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.

我尝试删除 node_modules 文件夹并尝试再次安装但仍然没有成功。有人有线索吗?

【问题讨论】:

    标签: react-native npm-install


    【解决方案1】:

    你确定你的 npm 命令吗?

    我找到了这个命令:npm install --save react-native-vector-icons

    (来源:https://github.com/oblador/react-native-vector-icons#installation

    然后在 js/ts 文件的顶部导入 react-native-vector-icons/Ionicons

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-01
      • 1970-01-01
      • 2021-01-26
      • 2022-11-19
      • 1970-01-01
      • 2022-10-05
      相关资源
      最近更新 更多