ionic2 , cordova build --prod not working with angularfire2 - ionic2

I have used angularfire2 in an Ionic2 app. ionic serve is working fine, but when i use sudo ionic cordova build android --prod it gives error Module not found: Error: Can't resolve '../../../angularfire2/auth' .
My ionic info is
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
local packages:
#ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.0
System:
ios-deploy : 1.8.6
Node : v7.10.0
npm : 4.2.0
OS : OS X El Capitan
Xcode : Xcode 8.2.1 Build version 8C1002
package.json has
"angularfire2": "^4.0.0-rc.2",
I tried npm install promise-polyfill --save-exact but no use.

Check the value of your Android_home environment variable. These errors often have to do with environment errors

Related

How to install Vapor 2 for Xcode 8.2.1 with Swift 3.1

What I am trying to do
I am following the guide to Install Vapor on macOS https://docs.vapor.codes/2.0/getting-started/install-on-macos/
Verify Swift Installation
eval "$(curl -sL check.vapor.sh)"
supported Vapor v 2
Add Homebrew Tap
brew tap vapor/homebrew-tap
brew update
brew install vapor
Vapor Toolbox: 3.1.4 is installed
My info:
iMac (24-inch, Early 2009)
OS X El Capitan - Version 10.11.6
Xcode Version 8.2.1 (8C1002)
Toolchain: Swift 3.1 RELEASE 2017-03-27 (a)
https://swift.org/builds/swift-3.1-release/xcode/swift-3.1-RELEASE/swift-3.1-RELEASE-osx.pkg
** UPDATE **
I cloned two repositories https://github.com/vapor/api-template (b6c7df2) and https://github.com/vapor/web-template (d206163)
Now I can create a Vapor v2 with Swift 3.1 projects like this:
API Template
vapor new ApiTemplate --template=https://github.com/ValeriyKliuk/vapor-2-api-template
cd ApiTemplate/
vapor xcode -y
WEB Template
vapor new WebTemplate --template=https://github.com/ValeriyKliuk/vapor-2-web-template
cd WebTemplate/
vapor xcode -y
There is a difference between the toolbox and the framework. The toolbox is the CLI tool that runs various commands, the framework is the thing you actually build against. If you do vapor new MyProject that will create a Vapor 2 project
(Note - I'm pretty sure that Vapor 2 requires Swift 3.1)

Visual Studio 2017 iOS Build Failed to acquire Cordova

I am building a mobile app using VS-TACO and I am trying to run my build on iOS.
When I try to build this app for iOS on a Windows host which is connected to a Mac with remotebuild agent, then I get following Error Message in Visual Studio 2017 on Windows Machine
"Remote build error from the build server
https://macIpAddress:3000/cordova - Error: Failed to acquire Cordova
version 6.3.1. TACO0204: Error installing cordova via npm. Exit Code:
1. See output for details. EShopper"
When i do "npm cordova -v" on my Mac, i see "5.4.2"
Windows OS: Windows 10
Mac OS Sierra
I have given all required user permissions as suggested in taco.visualstudio
Making npm cordova -v equals npm -v. It returns the npm's version, not the cordova version.
Cordova has to be installed on your PC(WINDOWS).
Could you do on your PC: cordova -v?
If nothing is return : npm install -g cordova#6.3.1 or npm install -g cordova#latest if you want the LATEST version of cordova.
Then you have to tell Visual studio to use the global version of cordova, for that: choose Global Cordova option in Config.xml editor UI.
Tell me if it's better, otherwise i'll guide you.

InAppBrowser and FileTransfer in ionic2

my ionic info of my project is
global packages:
#ionic/cli-utils : 1.3.0
Cordova CLI : 7.0.1
Ionic CLI : 3.3.0
local packages:
#ionic/app-scripts : 1.1.4
#ionic/cli-plugin-cordova : 1.3.0
#ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms : none
Ionic Framework : ionic-angular 2.3.0
System:
Node : v6.10.3
OS : macOS Sierra
Xcode : Xcode 8.3.2 Build version 8E2002
ios-deploy : not installed
ios-sim : not installed
In my existing project i need to work implement InAppBrowser and FileTransfer plugin the official document is updated to ionic 3 how can i find plugin related doc for my current version or is there any alternative way to do it.

npm install -g ionic#latest is not upgrading to ionic 3.0.1

After installation i still don't see 3.0.1
Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v6.10.1
Xcode version: Xcode 8.2.1 Build version 8C1002
ionic install -g ionic#latest installs the latest ionic-cli package. This is version 2.2.3 currently as is also shown by your output of ionic info.
Just run
ionic start myapp [template]
You will notice the current ionic-angular version to be 3.x in the project's package.json.

Ionic 2 RC1 Issue: Content in assets folder not copied in Device run

When doing ionic run android and the assets folder is not getting copied to device.
In my case i have translation-files for ng2-translate in src/assets/i18n
When I do ionic serve, it all works well in browser, but not happening with Device.
Screenshot of
Resources tab of Chrome Dev tools
www/assets that is copied right from src
I followed this link https://github.com/driftyco/ionic-app-scripts/issues/1761
and did npm install #ionic/app-scripts#beta
My Ionic info
Cordova CLI: 6.3.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.36
ios-deploy version: Not installed
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v4.2.6
Xcode version: Xcode 8.0 Build version 8A218a
With Ionic RC4 and corresponding ionic-app-scripts Upgrade, this issue is resolved.