I'm trying to deploy my site to Firebase Hosting with the following commands (see below). It used to work fine, but after changing project folders today it would only deploy 1 file (see pic) and the site is not working. After running firebase init and choosing no to configure as a single-page-app (reqrite all urls to /index.html), it is now deploying 2 files to Firebase hosting (and my public folder now has 2 files in it: index.html and 404.html). How can I return to deploying all 17 of my files to Firebase hosting again?
Commands I'm using:
ng build --prod
firebase init
firebase deploy
I finally got it to deploy after:
1) Running firebase init and setting public directory to dist
2) Running ng build --prod. This created a folder within the dist folder called 'hmn2' (my project name).
3) Copying all the contents within the hmn2 folder and pasting them one directory out, so they are directly under the dist folder. I also deleted the 'hmn' folder.
I'm not sure why it's putting them in another folder now (after upgrading to Angular 6). It didn't used to do this before.
I Had same issue with Ionic Just that below questions need to be answered correctly as below.
? What do you want to use as your public directory? www
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? File www/index.html already exists. Overwrite? No
i Skipping write of www/index.html
Related
I am using intl-tel-input in my project which I installed using npm. Every thing seems to work fine when I test using Firebase emulators but it stops working post deployment.
Upon checking the Sources tab in Chrome dev tools, I can see that the module is not properly included. (Pls check images) However, I am completely unable to figure out why. Please help!
Emulator Screenshot with the Telephone Input field working fine.
Screenshot taken post deployment with the Telephone input field broken.
Source File - intlTelInput.js located at /node_modules/intl-tel-input/build/css/intlTelInput.js
Source File - intlTelInput.css located at /node_modules/intl-tel-input/build/js/intlTelInput.css
By default Firebase ignores node_modules directories when deploying.
There are a few options you could use to resolve this.
Use a build tool like Rollup or Webpack to generate bundles that include node dependencies.
Copy required node_modules files to a different directory like assets and load them from there.
Update firebase.json to not ignore node_modules on deploy. Note that this will probably greatly increase the size of deployed applications if you have any number of node packages.
I have a project developed with react + next, now I want to deploy it to my host.
I ran next build and it creates .next folder with this content, I don't understand the content of server, static and there is no index.html
(I would expect to see something like Angular dist output folder)
In their documentation here, after running next build command they used zeit to deploy
I have 2 different projects that I'm working on concurrently. I worked on the 1st project and have a native index.js file for that project. Then, I wanted to write Cloud Functions' code for the 2nd project. So, when I typed 'firebase init functions', it is saying that there's a default project that's selected (even after typing "firebase use project-id"). How do I rectify this?
PS: I completed the whole sequence once and the index.js file got overwritten. Luckily for me, I had a back up for the 1st project.
Edit 2: I changed directories and created a project but it overwrote the index.js file once again in the 'functions' folder. How to fix this? Should I navigate out of the home directory itself?
Configure Multiple Projects
The Web and Admin SDKs are configured by directly passing values to
their initialization functions. For these SDK, you can use a runtime
check to select development or production configuration variables.
On your development machine / project build out each app under a unique folder.
I am not 100% sure to understand the problem but here are two possible scenarios:
1/ You are working in a specific project, writing Cloud Functions (i.e. modifying the index.js file) and you want to work on another totally different project. Just create a new directory (outside of the current project) and initialize a new project there, as explained in the doc here: "https://firebase.google.com/docs/cli/#initializing_a_project_directory"
2/ You are working in a specific project, writing Cloud Functions (i.e. modifying the index.js file) and you want to deploy the same code to another Firebase project. Just do firebase use <alias_or_project_id> as you have mentioned and then firebase deploy (or firebase deploy --only functions). Of course, in this scenario, you may need to adapt some other parts of your code when swapping from one project to the other, like for example the JavaScript config object.
If this answer does not answer your problem, please give some more details.
I created a generic repo in Artifactory which I want to deploy my artifacts to.
I'm trying to setup a simple-layout folder structure such as:
I can get this structure only if i'll deploy couple of sub folders.
When deploying I get in Artifactory this structure:
Which is anyoing because I set properties on the build_definition_name level
which I want to read and write to but they are not visible as it now points to
the version folder.
Any suggestion?
Artifactory by default compresses empty folders in the UI.
You can disable it easily by unchecking the following:
Ok I'm new to Polymer, after seeing the main page and Google IO 2016 video, I wanted to try it out, and right now I created a basic web application with it.
I managed to get it build and running it through the "polymer serve" command, but now that I want to release it to a production environment (I have an nginx cluster), how do I build the application to just a bunch of static website files?
I executed "polymer build" and I see the build folder and it contains 2 folders: bundled and unbundled, and inside them there are the bower_components, src and test folders as well as other stuff for running it through "polymer serve" but there's not a build/dist of build/static folder that I can copy into nginx so the application is served through it.
BTW, what I mean about a dist folder is without a readme, bower.json, test, bower_components, etc. just the pure needed HTML, CSS, JS, etc files that need to be served through nginx (or any other web server) as static file web content.
I went through the documentation but there's no details on how to do such task.
Any suggestions on how to build a static content folder for serving my polymer web app through nginx?
Thanks!
As of Polymer-CLI v0.11.0, there's no built-in way to filter out files from the bundle, but it's a requested feature. Also, the build output currently includes extraneous files (a bug), such as the test directory.
As an alternative, you could use Polymer Starter Kit 1.3.0, whose dist folder doesn't include the extra files (although it does include required bower_components as-is).