No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. jhb
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Best 1
    • Groups 0

    jhb

    @jhb

    1
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    jhb Follow

    Best posts made by jhb

    • RE: Quassar and Electron with firebase

      This seems to be the go-to reference for others trying to solve this problem:

      https://medium.com/firebase-developers/using-firebase-in-electron-tips-and-tricks-24ac5b44bf5a

      In the reference it says:

      Solution 1: Using a Bundler
      If your project uses a bundler, the project’s bundler config determines which of these Firebase bundles gets bundled into the final files. Setting the bundler’s config to prioritize the browser field over main will ensure the browser version of Firebase gets into your bundle, and Firebase will behave as if in a browser environment.

      Consult your specific bundler’s documentation on how to set the priority of these fields.

      Anyone know how I would accomplish this in Quasar?

      posted in Help
      J
      jhb

    Latest posts made by jhb

    • RE: Quassar and Electron with firebase

      This seems to be the go-to reference for others trying to solve this problem:

      https://medium.com/firebase-developers/using-firebase-in-electron-tips-and-tricks-24ac5b44bf5a

      In the reference it says:

      Solution 1: Using a Bundler
      If your project uses a bundler, the project’s bundler config determines which of these Firebase bundles gets bundled into the final files. Setting the bundler’s config to prioritize the browser field over main will ensure the browser version of Firebase gets into your bundle, and Firebase will behave as if in a browser environment.

      Consult your specific bundler’s documentation on how to set the priority of these fields.

      Anyone know how I would accomplish this in Quasar?

      posted in Help
      J
      jhb
    • RE: Quassar and Electron with firebase

      In Stack Overflow there’s a similar question for the same error:

      https://stackoverflow.com/questions/60954892/firebase-with-node-browser-targeted-firebase-bundle

      But in this case the OP was actually developing a node server-side application. The answer was to use the firebase admin SDK instead.

      So is it possible firebsase somehow sees electron as a server-side application in node?

      posted in Help
      J
      jhb
    • RE: Quassar and Electron with firebase

      Has anyone else run into this:

      When I run Quasar dev -m electron my firebase data is not being read.
      In the dev tools console there is a message:

      Warning: This is a browser-targeted Firebase bundle but it appears it is being
      run in a Node environment. If running in a Node environment, make sure you
      are using the bundle specified by the “main” field in package.json.

        If you are using Webpack, you can specify "main" as the first item in
        "resolve.mainFields":
        https://webpack.js.org/configuration/resolve/#resolvemainfields
        
        If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"
        as the first item in "mainFields", e.g. ['main', 'module'].
        https://github.com/rollup/rollup-plugin-node-resolve
      

      I checked the webpack link above and it references an entry in webpack.config.js

      module.exports = {
      //…
      resolve: {
      mainFields: [‘browser’, ‘module’, ‘main’]
      }
      };

      I found the webpack.config.js in an obscure folder referencing css optimization, didn’t seem a likely solution.

      I also found a github issue that sounds like angular/angularfire users are having the same problem. It’s still an open issue.

      Firebase is working in the normal quasar dev, so I don’t think it’s my app tha’s causing the issue.

      Thank You for any help

      posted in Help
      J
      jhb