我做到了 npm install firebase angularfire2 --save 安装。
然后,无论我喜欢离子Cordova运行android --device。离子cordova平台更新android ...等... 我甚至无法删除Android平台的错误。
出现此错误。
cordova platform add android --save
Using cordova-fetch for cordova-android@~6.1.2
Error: Failed to fetch platform cordova-android@~6.1.2
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/common@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/compiler@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/platform-browser@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/platform-browser-dynamic@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! path /Users/jpd/Dropbox/pusher/node_modules/.bin/create
npm ERR! code EEXIST
npm ERR! Refusing to delete /Users/jpd/Dropbox/pusher/node_modules/.bin/create: is outside /Users/jpd/Dropbox/pusher/node_modules/cordova-android and not a link
npm ERR! File exists: /Users/jpd/Dropbox/pusher/node_modules/.bin/create
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in:
npm
ERR! / {我们{1}} ERS / JPD / .npm / _logs / 2018-03-12T02_11_58_513Z-的debug.log
然后我安装其中一个依赖项 在终端上键入npm i --save @ angular / common @ ^ 4.0.0。 但有更多错误说
npm WAR
enter code here
离子信息如下。
cli包:(/ usr / local / lib / node_modules)
@ ionic / cli-utils:1.19.1 离子(离子CLI):3.19.1 全球套餐:
cordova(Cordova CLI):7.0.1 本地包裹:
@ ionic / app-scripts:3.1.8 Cordova平台:没有 离子框架:离子角3.9.2 系统:
ios-deploy:1.9.2 节点:v8.4.0 npm:5.6.0 OS:macOS High Sierra Xcode:Xcode 9.2构建版本9C40b 环境变量:
ANDROID_HOME:未设置 其他:
后端:遗产
答案 0 :(得分:2)
请尝试安装android@6.2.3版本。
cordova平台添加android@6.2.3
当你无法用 cordova platform rm android 命令删除android平台时,你可以删除android文件夹。
答案 1 :(得分:0)
问题出在您的npm。
我完全卸载了Nodej并删除了已安装的软件包 再次开始。我的问题解决了,但我会记住你的 下次解决方案。