I'm working on this app that needs to be as simple as possible plain vanillaJS, not npm packages if possible. I have been working with firebase and the way I have been working with it is by using the cnds as follows:
<script src="https://www.gstatic.com/firebasejs/7.8.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.8.0/firebase-messaging.js"></script>
All good until here..but when I tried to use the admin cdn and got a 404 errors since it wasn't found.
<script src="https://www.gstatic.com/firebasejs/7.8.0/firebase-admin.js"></script>
https://firebase.google.com/docs/web/setup
I didn't find the cdn on the docs, is it different? does it even exist?
Thanks!
What you're trying to do is not supported. The Firebase Admin SDK is not meant for use in web browsers. It's for backend/desktop code running nodejs.
You can see the instructions to get started with Firebase Admin here. You're expected to be using nodejs and npm to install the libraries.
Related
While using functionality of authentication through firebase, emulator is showing error i.e.{ you attempted to use a firebase module that is not installed on your android project by calling firebase.app() }.Please help me to resolve this error.
I'm using Expo as command line input.
react-native version -0.63.6,
"#react-native-firebase/app": "^8.4.3",
"#react-native-firebase/auth": "^9.2.3"
If you are using expo client, you should not use react-native-firebase modules because they are not compatible with expo client.
However, you can use firebase javascript SDK instead. It is all explained there.
Update 02-12-2021
Guys expo's eas-build is now public. You can add custom native codes and use react-native-firebase. Here is the link to a youtube tutorial. The video is short and super easy to follow. Here is the link to the docs
Previous answer
Currently, Firebase does not work in react native if you are using the mobile configuration. However, if you use the web configuration it will work. Here is the youtube tutorial. Watch from 38:20 to set up.
I'm pretty new to Firebase, and Web Development in general. Does anyone know how to avoid errors like these in WebStorm?
Ideally I would like to be able to point Webstorm towards some resource so it recognizes these functions. Everything works and this is technically just an annoyance, but I haven't been able to find a solution.
To link Firebase as a library in WebStorm's JavaScript project do as follows:
Hit Ctrl+Alt+S to open Settings page.
Open page Language & Frameworks > JavaScript > Libraries
Hit ADD... button on right
Fill name as firebase
Hit + and Attach Directories
Find your node_modules\#firebase folder inside current project
You can OK twice to confirm and close Settings page
Now your Firebase is recognized by WebStorm and all #types are defined, and you can Ctrl+Click any function, and get code completion!
Best regards!
Adding firebase as a dependency to package.json and then doing npm install should do the trick – WebStorm fill index the source files and provide code completion for Firebase APIs.
Alternatively, you can download firebase-app.js and firebase-auth.js from the CDN and then configure them as a Library in WebStorm as described in the docs.
Polymer CLI comes with several build options, including preset like es5-bundled.
I want to run my app on Firebase and have it compatible with older browser like IE11.
Are there specific build options that I should use?
I am using gulp after watching a video from the Google Polycast series
Building Firebase for production -- Polycasts #60
But the basic Polymer build should work as well without extra build options.
I just start developing hybrid apps using Ionic2 and Angular2.
I decide to use Firebase with AngularFire2, following this tutorial:
https://github.com/angular/angularfire2/blob/master/docs/1-install-and-setup.md
Everything works fine when I type ionic serve in terminal.
But when I run with ionic run -l and try to open in browser, it redirects me to Firebase Console. Meanwhile on iOS simulator, the project runs perfectly.
Can somebody help me to resolve this issue?
Also, recommend me some hosting to deploy apps with Ionic 2 and Firebase.
Thank you very much!
I have created a starter-kit for Ionic 2, Angular 4 and Firebase 3.
You can check it out here:
https://github.com/Temeteron/ionic2-firebase-starter-kit
I am not really sure what causes your problem. I encourage you to check this starter-kit, maybe Angular 4 will solve this problem.
About the hosting, this tutorial is deployed on app-engine of Google: https://cloud.google.com/appengine/
A have also deployed there, other web applications, either developed on polymer or Ionic 2. I will put the links below, so you can check out the speed of the response and of the connection that app-engine provides freely.
GitCV: https://www.gitcv.com/
Any Counter: https://any-counter.appspot.com/
Best of luck!
I have a problem...
I'm try to add this plugin: https://github.com/danwilson/google-analytics-plugin.
I'm develop an application with: AngularJS, Ionic and Mobile First Platform 7.1(MFP), in this version of MFP I must add the plugin manually.
iOS works fine.
My problem is Android:
Error: "The import com.google.android cannot be resolved".
I download Google Play Services with SDK but the problem continues...
Any idea to solve this problem?
Regards.
This other plugin https://github.com/appfeel/analytics-google uses gradle dependencies which should solve this problem.
Other option could be to remove google play dependency from the plugin you mentioned and manually modify gradle (actually I don't recommend this option as gradle gets generated automatically each time you remove/add the platform).
Other option is to modify the plugin itself (maybe a github fork). Here you can see what should it be modified: https://github.com/appfeel/analytics-google/pull/11/files