gpt4 book ai didi

android - 无法恢复插件 "cordova-plugin-insomnia"

转载 作者:行者123 更新时间:2023-11-29 02:37:48 51 4
gpt4 key购买 nike

我正在尝试构建我的项目,但失败并出现以下错误:

“运行命令 - 失败![错误] 运行 cordova prepare 时发生错误(退出代码 1):

    Discovered plugin "cordova-plugin-insomnia" in config.xml. Adding it to the project
Failed to restore plugin "cordova-plugin-insomnia" from config.xml. You might need to try adding it again.
Error: Failed to fetch plugin
cordova-plugin-insomnia@git+https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! git clone
C:\Users\<USER>\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-EddyVerbruggen-Insomnia-PhoneGap-Plugin-git-223

我尝试使用以下方法安装 cordova 插件:

  1. $ ionic cordova 插件添加 cordova-plugin-insomnia $ npm install --save @ionic-native/失眠

  2. 添加cordova插件 https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git

  3. npm i cordova-plugin-insomnia

但是,所有命令都不起作用。

错误生成为:

npm ERR! Command failed: git -c core.longpaths=true clone C:\Users\\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-EddyVerbruggen-Insomnia-PhoneGap-Plugin-git-223bcd2c C:\Users\\AppData\Local\Temp\npm-6956-d2de50d1\git-cache-d4203f45\8d2c3b01fc0c11d9bc36bc1b5f9a141bd097f908 npm ERR! Cloning into 'C:\Users\\AppData\Local\Temp\npm-6956-d2de50d1\git-cache-d4203f45\8d2c3b01fc0c11d9bc36bc1b5f9a141bd097f908'... npm ERR! git-upload-pack 'C:\Users\\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-EddyVerbruggen-Insomnia-PhoneGap-Plugin-git-223bcd2c': git-upload-pack: command 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! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues npm ERR! Please include the following file with any support request: npm ERR! C:\Workspace\XXXXXX-mobile-app\node_modules\npm-debug.log will push strings array {"name":"lang","titles":["English (US)","English (UK)"],"values":["en-us","en-gb"]} android preferences file was successfully generated ios settings bundle was successfully generated

我正在使用以下版本 -

  1. Node :v7.4.0
  2. NPM:v4.0.5
  3. Git:v1.9.5
  4. ionic :2

最佳答案

这并不总是解决方案,但在类似情况下,我只需运行一点 npm update,就可以了。最后,你应该做一个ionic cordova platform remove ... 然后 ionic cordova platform add ...

关于android - 无法恢复插件 "cordova-plugin-insomnia",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46000144/

51 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com