gpt4 book ai didi

android - 如何修复 Ionic 在 cordova 5.0.0 中不起作用

转载 作者:行者123 更新时间:2023-11-29 15:51:18 26 4
gpt4 key购买 nike

cordova 更新到 5.0.0 插件,当我运行“hello ionic start blank”或 sidemenu 时,新版本被重命名,我有问题,这就是终端,我有 mac OS X Yosemite

ma​​c os 版本优胜美地

基于sidemenu项目在文件夹/home/miguel/Cordova/hello中创建Ionic应用

Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================] 100% 0.0s

Downloading: https://github.com/driftyco/ionic-starter-sidemenu/archive/master.zip
[=============================] 100% 0.0s

Update config.xml
Initializing cordova project
running cordova plugin add org.apache.cordova.device
WARNING: org.apache.cordova.device has been renamed to cordova-plugin-device. You may not be getting the latest version! We suggest you cordova plugin rm org.apache.cordova.device and cordova plugin add cordova-plugin-device.
Fetching plugin "org.apache.cordova.device" via cordova plugins registry
Fetching from cordova plugins registry failed: EACCES, mkdir '/home/miguel/tmp/npm-3493-DFp6DkqV'
Fetching plugin "org.apache.cordova.device" via npm
npm http GET https://registry.npmjs.org/org.apache.cordova.device2
npm http 404 https://registry.npmjs.org/org.apache.cordova.device2
Fetching from npm failed: 404 Not Found: org.apache.cordova.device
Error: 404 Not Found: org.apache.cordova.device
at RegClient. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:268:14)
at Request.self.callback (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:148:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:876:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:827:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at streamreadable.js:920:16
at process._tickCallback (node.js:415:13)
running cordova plugin add org.apache.cordova.console
WARNING: org.apache.cordova.console has been renamed to cordova-plugin-console. You may not be getting the latest version! We suggest you cordova plugin rm org.apache.cordova.console and cordova plugin add cordova-plugin-console.
Fetching plugin "org.apache.cordova.console" via cordova plugins registry
Fetching from cordova plugins registry failed: EACCES, mkdir '/home/miguel/tmp/npm-3506-WhGg6OTV'
Fetching plugin "org.apache.cordova.console" via npm
npm http GET https://registry.npmjs.org/org.apache.cordova.console1
npm http 404 https://registry.npmjs.org/org.apache.cordova.console1
Fetching from npm failed: 404 Not Found: org.apache.cordova.console
Error: 404 Not Found: org.apache.cordova.console
at RegClient. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:268:14)
at Request.self.callback (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:148:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:876:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:827:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at streamreadable.js:920:16
at process._tickCallback (node.js:415:13)
running cordova plugin add com.ionic.keyboard
Fetching plugin "com.ionic.keyboard" via cordova plugins registry
Fetching from cordova plugins registry failed: EACCES, mkdir '/home/miguel/tmp/npm-3519-Pc7mh_MZ'
Fetching plugin "com.ionic.keyboard" via npm
npm http GET https://registry.npmjs.org/com.ionic.keyboard
npm http 404 https://registry.npmjs.org/com.ionic.keyboard
TypeError: Cannot read property 'latest' of undefined
at next (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/lib/cache.js:687:35)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/lib/cache.js:675:5
at saved (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
at Object.oncomplete (fs.js:107:15)

最佳答案

试试这个,

进入您的项目文件夹 hello 并使用以下命令直接从他们的 GitHub 安装 cordova 插件

 $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git

有关更多详细信息,请查看 here 上的问题

希望对您有所帮助。

关于android - 如何修复 Ionic 在 cordova 5.0.0 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29919484/

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