Flutter web located in a server folder - flutter

I have recently upload a flutter website inside of a folder in my server.
But it's not working well. I have notice that main.dart.js needs to have the folder name in the url. But It is not working well... What more things I have to change for running the website without more problems?

Try adding the base path to you're index.html.
Example:
<base href="/FolderName/">

Related

Fiebase hosted url not working after deploying it again

I have update my already deployed flutter project and deployed it again in firebase . It shows the deployment is complete ,but my hosted url leads me to a firebase documentation page like below :
I intially typed:
firebase init
firebase deploy
The url was working fine when I deployed it for the first time . I
made some updation on my project and tried to deployed it again .What can I do now ?
this is my firebase.json:
I have solved the issue , I shouldn't have overwrite the index.html .Overwriting index.html will produce a default index.html which is created by firebase .So when they ask File build/web/index.html already exists. Overwrite? No should be given .
As I see your in image,it shows your build/web folder contains only 2 files in the folder. This is mostly happens if the deployment path incorrect.
Follow the steps to sovle the issue
Enter firebase init. After running this command it will show the parent folder path of your project as in the below image.
After that select Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys this future to host.
And then hit enter button
This will show you the public directory of your project as below
After that enter your public directory as build/web.
If you do all the above steps correctly while deploying the code, your build/web will contains around more than 70 files as the below image
I hope this will solve your issue

How to deploy a flutter web if I'm using Host Gator as server?

I did these steps:
Step 1: I wrote on terminal flutter build web --web-renderer canvaskit--release
Step 2: compress the files in a zip file and uploaded on public.html inside my file manager from my cPanel:
In the past, I updated the DNS and wait 3 days to see my website running, but unfortunately I can't see it:
What I am doing wrong, and finally, how can I solve this problem?
Thank you in advance
You are missing flutter.js file. Please check ./your-app/build/web folder for the missing file(s), or try to run flutter clean and then flutter build web again.
you need to update your index.html
Change
<base href="/"> to <base href="./">

FireBase not hosting index.html

So I have followed all the steps and I am sure my steps are correct but still firebase is not hosting my index.html. it is showing default index.html which doesn't even exists. I have only index.html under my root folder and no matter how many times I do 'firebase init', it says that the project is hosted but no json file or dist file or any other file is ever created.
firebase login
firebase init
your-build-command-here
firebase deploy
Tried all the above steps but didnt work. Need some help.
Put your html into a public/index.html directory
and type n when firebase asked you to override your index.html file
follow the steps given in below Url.
https://medium.com/#aleemuddin13/how-to-host-static-website-on-firebase-hosting-for-free-9de8917bebf2
you try these fixes as well.
Firebase not running index.html file

How to build browser version in Ionic 4

How to build browser version using Ionic 4. When I tried to build using ionic cordova build browser --prod and uploaded platforms/browser/www files on server and tried to run in browser it’s not showing anything(webpage is blank) and getting below error in devtools.
Can anyone please help me on the same?
Hi I also had this problem with my vuejs apps and it also happened with the new ionic 4 production build.
It looks like these system assume that you are going to drop the "dist" or "www" files in the home directory of your web server like in my case I was using xampp server. But we usally put these files in a sub directory like htdocs/app2.
So for this to work you need to change the <base href="/" /> in ionic 4 to <base href="/app2/" /> or what ever your app is. In vue js it's almost the same thing. but you can manually add "/app2" to the index.html file's scripts.
That worked for me; you can try it.
If you are trying to deploy the app in the server in a custom folder then you need to change the <base href="/" /> to <base href="/custom_folder_name/" /> in the index.html file in your project.
Try this change in index.html base.
Before: href="/" />
After: <base href="./"
it changed in the last version. This works for me:
ionic build --prod --public-url=/app/
I had the same problem, my solution was to upgrade xampp version to latest.
Try ionic build --prod.. The www folder has everything you need for a website.

Appcelerator Titanium Mobile: app.js not found

I created an app with Appcelerator's Titanium Mobile on my home machine. The path was /Users/[myusername]/Projects/ProjectName.
I checked my code into Mercurial.
The next day, at my office computer, I cloned the Mercurial repo, and then added the existing app. I tried to run it in the simulator and received the error:
could not find the file app.js.
I looked at the log and noticed that the path it was looking for was the path on my home computer, not the path on my office computer.
What can I do to make my app run on two different computers? I imagine that if I created a new app and then copied my code into it, it would probably work on the office machine. But if I checked my code in, and got latest at home it would probably be broken there.
Open tiapp.xml
Remove the line. f01a795a-46e7-4627-8558-465e5998c99d
Do a full rebuild
Bring guid tag back (just to make sure you still have it on tiapp.xml)
Do a full rebuild again.
Here's the source:
http://www.limechalk.com/blog/fix-runtime-error-when-running-appcelerator-app-on-android-emulator/
Can you re-create a new project? copy your files tiapp.xml as well as folder Resources to your new project and build again.
This issue mainly caused by JavaScript minification,either you have syntax error in one or more js files or which is hard to predict may you have some other files in you project that are not js files and cause this failure to build and then this common error .
my two cents open up you project files and look carefully for any file or files that are not supposed to be in it.