A few weeks ago, ‘ionic start tutorial --v2’ created a new projet folder with the ‘app’ folder INSIDE the ‘www’ folder. Now a time, the same command put the ‘app’ folder ASIDE the ‘www’ folder. And ‘ionic serve’ don’t find his build…
Any idea of what is happening ?
I forgot to mention the project name in my topic. I do use the following: ionic start <ProjName> tutorial --v2
.
I sometimes have issues using templates when updating to later versions of v2, and I think I ran into this issue when the ‘app’ folder was moved.
Try just using ionic start myapp --v2
instead of using the tutorial template.
Edit: Also, if it is an issue with the tutorial template you should open up a ticket in GitHub for the Ionic team
The directory structure was changed so the app
folder is now outside of the www
folder. Everything in www/build
will be auto generated from the app
folder. The conference app is a good project to view when you aren’t sure if your project is correct. It has a section in the README explaining the file structure. Please keep in mind this section is manually updated and can be out of date at any time, but we try to keep it updated.
The app
directory should be your working directory now, and any assets (images, json files, gifs, etc) that your app needs to use should go in the www
directory since this is directly copied over to the platform folder. Here is the issue where we discussed changing the directory structure:
If you are having problems with ionic serve
make sure to update the Ionic CLI to the latest version needed for Ionic 2 (at the time of writing this is 2.0.0-beta.15
) by running: sudo npm install -g ionic@beta
Let me know if you’re having issues with ionic serve
on the latest CLI.