我做了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
呃! /我们 enter code here
ers / jpd / .npm / _logs / 2018-03-12T02_11_58_513Z-debug.log
然后我在终端上安装了一个依赖类型npm i --save @ angular / common @ ^ 4.0.0 . 但有更多的错误说
战争时间
N @angular/common@4.4.6 requires a peer of @angular/core@4.4.6 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/forms@5.0.3 requires a peer of @angular/common@5.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser@5.0.3 requires a peer of @angular/common@5.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser-dynamic@5.0.3 requires a peer of @angular/common@5.0.3 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.
离子信息如下 .
cli包:(/ usr / local / lib / node_modules)
@ ionic / cli-utils:1.19.1 ionic(Ionic 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操作系统:macOS High Sierra Xcode:Xcode 9.2构建版本9C40b环境变量:
ANDROID_HOME:没有设置其他:
后端:遗产
2 回答
请尝试安装android@6.2.3版本 .
cordova platform add android@6.2.3
当你无法用 cordova platform rm android 命令删除android平台时,你可以删除android文件夹 .
Problem is in your npm.