Table Of Contents
Introduction
1.1 Assumptions
Installation
Firebase Configuration and Application Environment
Structure
Base Ser...
For further actions, you may consider blocking this person and/or reporting abuse
Hi! Thanks for the article! I'm always using this to start a new firebase quasar app. I see that you updated with dotenv instead of qenv. But I encountered problems with it or with the way the scripts are built. I reinstalled cross-env and used that in my script so now it "cross-env QENV=DEV quasar dev" again and it magically works. Hope you put back that part of the article again and hope this helps any newcomers that might be having the same problem
Thank you for pointing that out. I'll update the article and repo.
Thanks a lot!
Suggestion for env:
package.json
env-loader.js
quasar.conf.js
.env
process.env when staging
process.env when production
Hey Benjamin thanks for your read and suggestion. Just curious, was your suggestion to mainly remove the QENV namespace in the build env, or was there something more that you were highlighting?
Thank you for this.
Just a quick typo: the link to the Boot Files doc doesn't work, as of 2020-12-04. The correct link is: quasar.dev/quasar-cli/boot-files
My
quasar.env.json
file andpackage.json
scripts are exactly as yours are in your repo, but in myserverConnection.js
file this is what worked...const config = process.env.FIREBASE_CONFIG
From the QEnv docs you can set a "Common Root Object". This is what I did for my QEnve installation and is reflected in my code in the
serverConnection.js
file.QEvn docs: github.com/quasarframework/app-ext...
Ah. I see what happened. During the QEnv setup I defaulted to "none" when asked, "What name would you like to use for your Common Root Object." After going into my
quasar.extensions.json
file I was able to switch thecommon_root_object
value toenvironments
. Worked like a charm! Thank you for responding and pointing me to the root of the issue.Thank you for posting your question. I added a bit of guidance in that area of the article pointing out that piece of QEnv.
can this approach be used for firebase 9? Even with importing { initializeApp } and { getAuth } instead, I receive:
[Quasar] boot error: ReferenceError: process is not defined
at Array.WEBPACK_DEFAULT_EXPORT (firebaseConnection.js?4d99:4:1)
EDIT: well, I didn't know that we have to put the env object into the build config object in the quasar config. Just had it in 'return', but it has to be:
return {
...
build: {
...
env: {
QENV: enviromentConfiguration(process.env.QENV)
}
...
}
...
Hey , first of all thank you for posting this guide. It has been very informative. I've gone through it and implemented this login method on my app. Although i stumbled upon an issue that I am unable to resolve. As a matter of fact it is part of the guide, in the 4th section "Otherwise, your application will fail to initialize and you will have a Quasar boot error and a Firebase error message stating you have an invalid key." I've checked the API key a number of times and it does seem to be correct. I cannot figure what do you mean with this step of the guide "The Firebase API key doesn't get validated until an authentication method is executed. This will be highlighted in the Email Authentication article."
Thanks in advance
Ok i found my mistake , i'm gonna drop it here in case anyone else encounters it. I didn't read the QEnv documentation all the way through. Apparently in order to be able to run QENV on Windows you also have to run "npm install --save-dev cross-env" and modify package.json to "dev": "cross-env QENV=development quasar dev"
🔥🔥🔥
You lost me at qenv. Made multiple attempts to get past the 2nd step in the 1st tutorial and quit in frustration.
Jim are you familiar with what QEnv is doing and how it is handling the Firebase config object? Be sure to read the QEnv docs as this is a great Quasar application extension that offers the developer to handle our environment configurations during the build process. Feel free to jump into the Quasar discord in the #firebase channel for some clarification and help.