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

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="./">

Related

Flutter Web Blank Page when releasing with html

I know that it is something to do with <base href="$FLUTTER_BASE_HREF"> and <base href="/">. But, even if I delete it, or put './' or anything I've tried, nothing has solved the blank page issue that I have right now.
I am hosting from the project's build/web directory using npx http-server. In this case, how should I fix my index.html file? I haven't changed anything. It is just from flutter create.

Flutter web located in a server folder

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/">

How to fix 'no entries found' on server run in Parcel.js

On trying to run the server with 'parcel index.js':
Server running at http://localhost:1234 🚨 No entries found.
at Bundler.bundle (/usr/local/lib/node_modules/parcel-bundler/src/Bundler.js:275:17)
Server is showing a 404 error. I'm having the same problem with all my projects, so I feel like this is a global issue. Everything was working fine on all projects and suddenly this is occurring.
already tried:
uninstalling parcel-bundler and reinstalling (globally + locally)
Thanks!
Simple mistake, was using "parcel index.js" when I should have been using "parcel index.html"
As above check the directory from which you are working i was inside src and running src/parcel index.html it should be parcel index.html
Mine was typing parcel /src/index.html instead of parcel src/index.html. Spent 20 minutes on this.......
Maybe you are running parcel in a subfile of a project, so you need to add the path relative to the root directory,my path is parcel Navigation-webpage/index.html
My mistake on windows was that I used parcel src/index.html instead of parcel src\index.html
Try
npm i #parcel/transformer-sass
And update parcel bundler .
npm i parcel
Make sure you've got all your filenames in the explorer view spelled correctly. That was my solution to this problem.
I meet the same error.
And please check json file:
"source" : "src/index.html"
It's source instead of main.
I fixed this error by discovering my mistake at first
when I created the project main folder and then created the /src folder by mistake I created the index.html in the main folder, not inside the /src folder
and when I do npm run dev I get this error
Build failed.unknown: Entry Error
So to fix that I moved the files [index.html - main.scss - widget.js] to the src folder, So now it looks like this
enter image description here
And it works
Important hint here because it happened to me too: after you move the
files and try again with "npm run dev" you will get an error and the
reason why is that you need first to change all the directories of the
imported files in the [index.html], like main.css app.js and the
images too before running parcel again.

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.

cordova 1.7.0 set info error

I am using cordova 1.7.0. My app is running fine in simulator but a message comes like
Error: executing module function 'setInfo' in module 'cordova/plugin/ios/device'. Have you included the iOS version of the cordova-1.7.0.js file?
I have included
<script type="text/javascript" charset="utf8" src="[location of cordova.ios(for ios)]"></script>
in index.html but did not work.Plz help.
there must be something wrong with the path to the js.
The index.html file is read?
Is your www folder maybe a group instead of a reference folder?
Go step by step
This generally happens when the cordova file is not properly available when the page is loaded. You can check that it is referencing properly by opening the index.html (or your start page) in the Chrome and check in Inspect Element that all the resources are loaded and there are no errors.
to solve this problem, just follow steps in picture