Firebase hosting application deploy - firebase

I tried to deploy my application using Firebase (in build folder I have an index.html file) but I get the following error:
Does anyone know what might had gone wrong?

That's actually the default content in the automatically generated index.html file by the Firebase CLI when you initialize your project. That's not an error; If you already have HTML ready to go, just paste it inside the index.html file inside your build folder.
Your screenshot is showing the local index.html file, make sure to deploy your site by running firebase deploy --only hosting; And also double check your public attribute within your firebase.json file is configured to take the build folder.

Related

Firebase hosting not recognising next.js index page

We have picked up a very messy half built project and are trying to get it into an external beta testing state...
It is a next.js application which works fine if we run npm run build and then npm run start.
We prefer to host it on Firebase, for all the normal reasons and I believe it should be possible to do so.
However, when we install firebase and enable firebase experiments:enable webframeworks and firebase init hosting and accept the default options (Y,N) it adds the standard firebase index.html to the public folder - even though it didn't ask if we wanted that...
If we leave that index.html in place in the public folder then run firebase serve or firebase deploy, the /public/index.html is delivered as the root page of our site. When it should be the Index of the next application. If we delete the firebase index.html, and then rerun firebase serve to rebuild, then we get an 'undefined url' error (as it can't find the /public/index.html presumably).
We have an index.tsx in the /pages dir and when we run firebase serve, the build process does seem to be placing index-xxxxx.js chunk files etc. in .firebase/sitename/hosting/_next/static/chunks/pages.
We have tried adding rewrites in the firebase.json of various sorts, changed versions, everything we can think of. But still can't work out why firebase is not recognising the site root index page when it is running just fine on npm run start.
Any help appreciated to help us troubleshoot.

Is there any way to use Firebase hosting/platform for an ACTUAL working website written in ejs?

So I know perfectly well how to use Firebase hosting and platform for a website code file such as index.html or app.js(in this case, use Cloud Functions). But what about a website that has zero code in html but only ejs code ? I tried running Firebase for it and it didn't work because Firebase could not find any index.html file sitting in Public folder because there was no html file to begin with and then when Firebase searched for app.js file in functions folder, it failed as well because there was no file with the extension ".js". So is there no way to run a website purely written in an ejs file?
I don't think EJS is supported in Firebase hosting. You'd have to host your own Express site elsewhere

Firebase Deployed URL not working?

So I have built a simple firebase and javascript app that uses firebase database and hosting.
I have successfully built the app and deployed to Firebase hosting, however when the cmd provides the url that leads to the app it takes me to some completely random firebase landing page.
All deployment is correct and I know all my code is correct, but it keeps sending me to the random landing page: https://firebase.google.com/docs/hosting/
When you first create a project on firebase it asks you for the public directory: What do you want to use as your public directory? public
Usually the default its public, so the firebase generates a random welcome index.html there.
When you setup the firebase init configure the public directory to your files and you should see your app instead of the welcome index file, or simply put all your files inside the public directory you've chosen above.
Here I found a very simple tutorial on how to get started on that: https://www.brooks-patton.com/deploying-a-static-website-to-firebase/
Another way - you can just edit firebase.json file, in the line with "public" change the path where is your code was built.

Deploy Vue.js app to Apache server

i need some help. I wrote an SPA using VueJs. I ran "npm run build" so i can test my app on my Xampp server. The build generated a "/dist" folder. I changed the index.html in the dist folder to index.php. I tried serving the dist folder with Xampp but it shows a blank page. Please help. I have uploaded the image showing the errors
https://i.stack.imgur.com/ae7GM.jpg
I had the same issue; a bunch of 404's in my console after running
npm run build. Ceejayoz is correct in suggesting you take a look at your network tab to see where the server is expecting to reach the file.
His suggestion tipped me off that my application did not have a base URL set.
Vue's docs on this.
After setting the path my app was located at, I reran the build process and it came right up.
dist files can only be served via http, you have to deploy it to your hosting server before you can see the output of your vue app

Ember app Firebase static file location

Can anyone tell me where is my static file located in Firebase if I deploy ember app to Firebase? In my local drive, the static file is under public/assets/ like xxx.pdf ;
BTW everything works as it's meant to be whether locally or from Firebase URL. I just wonder where is the file, so that I can replace/modify directly on Firebase if possible.
When you build your ember app to production on Firebase, all static files are transferred as they are into your public directory which is dist so public/assets/xyz.pdf will be at assets/xyz.pdf in relative to the app root directory.

Resources