0
votes

I did npm install firebase angularfire2 --save to install.

and then, whatever I do like ionic Cordova run android --device. ionic cordova platform update android… etc… I can’t even remove android platform for this error.

has this error.

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 [email protected] requires a peer of @angular/common@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/compiler@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] 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! /Usenter code hereers/jpd/.npm/_logs/2018-03-12T02_11_58_513Z-debug.log

then I install one of those dependency typing npm i --save @angular/common@^4.0.0 on terminal . but has more error saying

npm WAR

N @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/compiler@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser-dynamic@^4.0.0 but none is installed. You must install peer dependencies yourself.

ionic info is as below.

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils : 1.19.1 ionic (Ionic CLI) : 3.19.1 global packages:

cordova (Cordova CLI) : 7.0.1 local packages:

@ionic/app-scripts : 3.1.8 Cordova Platforms : none Ionic Framework : ionic-angular 3.9.2 System:

ios-deploy : 1.9.2 Node : v8.4.0 npm : 5.6.0 OS : macOS High Sierra Xcode : Xcode 9.2 Build version 9C40b Environment Variables:

ANDROID_HOME : not set Misc:

backend : legacy

2

2 Answers

2
votes

Please try to install [email protected] version.

cordova platform add [email protected]

And you could remove android folder when you can't remove android platform with cordova platform rm android command.

0
votes

Problem is in your npm.

I completely uninstalled Nodejs and removed installed packages then started again. my problem was solved but I will keep in mind your solution for next time.