Ionic 2 www empty folder - ionic-framework

I am trying to test a sample Ionic2 app. I have started using ionic start AppName --v2.
Got the code in local with src folder. But the www folder is empty. When I do ionic serve, its opening the app in browser and throws the below error.
Error: ENOENT: no such file or directory, open 'path\to\folder\www\index.html'.
www folder is not getting updated with the compiled code. Nor build folder is getting generated inside the src folder. I have typescript and other compilers installed as well.

Try re-installing ionic framework, and making sure your CI is updated.
It could also be a permission issue, have you tried using sudo ?
sudo ionic start AppName tabs --v2 --ts
also make sure you are at the root of your application when running
ionic server

Related

Disable .vscode-server/data/user/history caching

i use nextjs in vscode and every time i build my app with
npm run build
the buildId and old build path are saved in .vscode-server/data/user/history I want to disable this because for some reason my nextjs app uses that old info sometimes and changes my new build on itself what results in a 404 error for the buildManifest.js file. This is because it uses the old folder name but the folder has a different name (generated with npm run build). I do this with SSH to my raspberry pi. Let me know! Thanks.

How I can open a project in browser when LiveReload don't go to the my project - ionic-framework

When I generate a new folder in the ionic app, I call ionic serve, but it shows me localhost:8100/tab1/tab1. Then I delete tab1/tab1 and write /myApp/myApp, but LiveReload again shows me localhost:8100, I tried, again and again, to write the path to my project, but it shows me again and again localhost:8100. What can I do?
Try: ionic serve --no-livereload

ionic 4 sub paths not loading when running ionic serve

I had an ionic 4 beta project of --type=angular that was loading at any path without issue.
Periodically, i have been updating my packages by running an npm update and am currently at:
"#ionic/angular": "^4.0.2"
as well as updated installs for the ionic cli, and am currently at:
CLI 4.10.3
I am not sure when this app loading issue started, but i suspect it was after running the last npm update or update install of the cli.
When running ionic serve my application loads correctly, and i am able to navigate to all sub paths without any issues.
However, when:
• refreshing the browser while viewing a sub path
• attempting to enter a url with a sub path
• live reloading while viewing a sub path
the app attempts to load all js files relative to the sub path and fails to run like so:
http://localhost:8100/page/sub/path
fails to load because the app attempts to load runtime.js here:
http://localhost:8100/page/sub/path/runtime.js
my base href is currently set to ./
When i inspect the html source, the script tags are formatted as follows:
<script type="text/javascript" src="runtime.js"></script>
If i attempt to load a page directly at the root, the application loads ok without issue like so:
http://localhost:8100 loads OK
http://localhost:8100/page loads OK
So again to recap, the app only fails to load the js assets at a sub path.
Any idea where to begin troubleshooting?
For anyone running into this same problem, i have the answer.
I am not sure when or why, but my base href was set incorrectly and this was the problem.
I changed my base href from ./ to / and this solved my problem.

Ionic Framework unable to change content src from index.html to index.php

I am new in Ionic Framework.
So via ionic cli i started a new app with blank template to run in android platform.
What i wanted to do is to replace the index.html with index.php in my app's folder that ionic cli automatically created for me.
So i moved into the www folder of my app i deleted the index.html file and instead i created an index.php file, then i moved into config.xml file and i changed the content src to points in the index.php file instead of index.html.
The problem is that i get this error in the browser:
Error: ENOENT: no such file or directory, open 'C:\Users\user\cmsApp\www\index.html'
and seems that my app still points to the default index.html (that doesn't exists anymore) instead the php one that i replaced with.
How can i fix that?
Thank you in advance!!!
You can try to modify the config file located here :
/PathOfYourProject/Config.xml
There is a part where you can change the source :
<content src="index.html"/>
But i'm not sure that you can place PHP file here.

Ionic Starter App testing - www directory not dound

I am new to this platform and I am following the guidelines at the docs. I am trying to test the app using ionic serve CLI response is that there are 3 addresses....I choose localhost and an error comes up - ""www" directory not found. please make sure the working directory is ionic project"
I need help working around this.
I am working on windows 7.
This generally happens when you try to run your project into sub-directory which do not contains ionic project. Verify if you have 'www' folder inside your ionic project or you mistakenly went inside other sub-directory and trying to execute 'ionic serve' command.
After creating you project. The cmd screen will give you the directory of newly created project. Therefore in the CMD type this command:
cd yourprojectname
eg
cd myionicproject
after that command is completed enter command:
$ ionic serve