Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase module not working in paperbits-demo publisher, works in designer #229

Open
feranto opened this issue Mar 25, 2023 · 0 comments
Open

Comments

@feranto
Copy link

feranto commented Mar 25, 2023

Describe the bug
Using the paperbits-demo version 0.1.526 and trying to configure it to work with firebase, gives me the following error when trying to build the website.

To Reproduce
Steps to reproduce the behavior:

  1. Using the paperbits-demo version 0.1.526
  2. Adding the "@paperbits/firebase": "0.1.575" package in package.json
  3. Uncommenting the firebase import, and injection in startup.design.ts
  4. Uncommenting the firebase import, and injection in startup.publish.ts
  5. Adding the firebase configuration in config.design.json
  6. Adding the firebase configuration in config.publish.json
  7. Running the designer with npm start, works correctly stores data in real time database
  8. Running the publisher with npm run publish, gives the following error:
/paperbits-demo/dist/publisher/index.js:20397
module. Exports = firebase-admin;
                 ^

ReferenceError: firebase is not defined
    at Object.firebase-admin (/paperbits-demo/dist/publisher/index.js:20397:18)
    at __webpack_require__ (/paperbits-demo/dist/publisher/index.js:21114:42)
    at eval (webpack://paperbits-demo/./node_modules/@paperbits/firebase/services/firebaseService.admin.ts?:13:15)
    at Object../node_modules/@paperbits/firebase/services/firebaseService.admin.ts (/workspaces/help5gt-website/paperbits-demo/dist/publisher/index.js:17164:1)
    at __webpack_require__ (/paperbits-demo/dist/publisher/index.js:21114:42)
    at eval (webpack://paperbits-demo/./node_modules/@paperbits/firebase/firebase.admin.module.ts?:6:33)
    at Object../node_modules/@paperbits/firebase/firebase.admin.module.ts (/workspaces/help5gt-website/paperbits-demo/dist/publisher/index.js:17109:1)
    at __webpack_require__ (/paperbits-demo/dist/publisher/index.js:21114:42)
    at eval (webpack://paperbits-demo/./src/startup.publish.ts?:12:33)
    at Object../src/startup.publish.ts (/paperbits-demo/dist/publisher/index.js:19430:1)

Expected behavior
Publishers should be able to use firebase data and publish final website.

Desktop (please complete the following information):

  • OS: ubuntu 18.04
  • Browser Edge
  • Version 111.0.1661.51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant