Ionic2 Build folder structure missing - ionic-framework

I'm starting to learn Ionic2, I have created a new project with ionic start myproject --v2 and everything works correctly if I do ionic serve.
The build folder is missing in ionic 2 project folder.
Whenever I am trying to download any existing Ionic2 template in that one also build folder missing.
ionic -v 2.0.0-beta.30
cordova -v 6.2.0
node -v v6.2.1
npm -v 3.9.5

your ionic serve build is under www. The native builds ( from ionic build) are under platform.

A little late but I had the same issue and was able to fix it by installing Gulp :
npm install -g gulp
Then I did gulp build.
This solved my issues and generated the build folder as it was supposed to.

First you need to add support for the platform/s you are working with, by executing from Ionic CLI console:
ionic platform add android
or
ionic platform add ios
And then you should build your project by executing:
ionic build android
or
ionic build ios

Related

Ionic config directory error. (How to solve)

I have a issue using ionic on my mac. I've cloned my repo and started it with ionic serve. But if I use control C and stop the command ant start it again I get this error "Cannot read property 'IONIC_CONFIG_DIRECTORY' of undefined".
Same problem here. Found the solution: https://forum.ionicframework.com/t/ionic-commands-not-working-after-update-ionic/146492/3
Solution:
npm uninstall ionic cordova
npm install ionic cordova

how to build apk from a ionic framework source code?

how do I build apk from an ionic framework source code? which app is used to build the apk?
I tried to build with Cordova but I don't know how to work on a existing code.
1) Install the node.js from here
2) open the terminal, npm install -g cordova ionic
3) open the folder of the project from the terminal
4) in the terminal npm install(make sure node.js is insta
5) ionic cordova build android
Being in the project root directory, run the below command:
npm install #ionic/app-scripts#latest --save-dev
If successful, connect your android device with Your laptop via USB & make sure, USB debugging enabled. Then try
ionic cordova run android
Again if you face issues, resubmit the trace. We'll check!

Visual studio 2015 First Ionic Application issue

I am new in Ionic,I have installed Ionic project template, android sdk and select a new ionic tab and also use below code:
npm install -g cordova ionic
Project Folder as below :
After then select Android and run project but is gives below screen.
I dont know what to do next, I have also install task runer.
Thanks.

How to keep both ionic 1, 3, version in my system

Initaially i was working with ionic 1.7.6 version with many apps. And by today some how i have changed to version 3.0.0. Now when i open my old projects under package.json i see the version as 3.0.0 instead of 1.7.6. And when i do sudo ionic build android it throws me some error to upgrade the version.
So now i have uninstall the ionic & cordova from my system.
Now i want to keep ionic 1 version 1.7.6 as well as ionic 3 version 3.0.0 how can i do it now.
so when ever i open the ionic 1 project i need to work on angularjs with ionic 1 version.
And when ever i open the project that i have created with version 3 i need to work with latest version of angular is with ionic 3..
please some one expalain me what should i need to do ??
Thank in advance !
I suspect you have installed ionic globally. If you want to run the local/project version of ionic you need to sudo ./node_modules/ionic/ionic ....
This will be the version of ionic as defined in the package.json of the project.
You can tuck this nicely away however using npm scripts (in your package.json):
e.g.
"scripts": {
"ionic": "sudo ./node_modules/ionic/ionic build "
}
Ten simply execute npm run ionic -- android

Missing ionic.project file

I just updated nodejs ionic and cordova. Create new ionic project as before:
ionic start myApp blank
In terminal, go to myApp directory, and input:
ionic state
I got message:
You cannot run any state commands on a project that is not an Ionic
project. Try adding an ionic.project file or running ionic start to
get an application to save or restore (CLI v1.7.10)
My system information:
Cordova CLI: 5.4.0
Ionic Version: 1.1.1
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.3
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v5.1.0
Xcode version: Xcode 7.1.1 Build version 7B1005
Question: Where ionic.project file, I don't remember there was this file in project before. How to add ionic.project file?
How do I find this problem? Because I check out source from git, I try to use ionic state restore command to restore application for building. But I got same message, missing ioinc.project. So I create a new ionic project to find reason, but I'm still confused.
If use
ionic start
You will got
Invalid command (CLI v1.7.10)
Of course, there is not directory argument for this command. If you give directory as ./, this command only create and overwrite all project file.
screen shot
The new name of this file is ionic.config.json
I was facing the same issue.
just run the command
ionic serve
ionic.project file gets auto generated
EDIT
ionic.project is replace by ionic.config.json. So you should change in ionic.config.json
If you are happened to use ionic#beta, it won't install it until you downgrade it to ionic V1 then "ionic setup sass" or "ionic serve".
Most simple/easy solution to this problem to install a chrome extension named CORS. and everything will work perfectly.