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

server and client share node_modules folder #1802

Closed
xinthose opened this issue Jul 7, 2022 · 1 comment
Closed

server and client share node_modules folder #1802

xinthose opened this issue Jul 7, 2022 · 1 comment

Comments

@xinthose
Copy link

xinthose commented Jul 7, 2022

According to this SO post, I cannot have firebase and firebase-admin in the same package.json? My server and client share a node_modules folder so that I can run the code in AWS Beanstalk.

    "firebase": "^9.8.3",
    "firebase-admin": "^11.0.0",

I am getting this error when I try to run my compiled JavaScript using node.js

C:\inetpub\wwwroot\portapay_node\node_modules\firebase-admin\lib\app\firebase-namespace.js:136
            return this.ensureApp(app).firestore();
                                       ^

TypeError: this.ensureApp(...).firestore is not a function
    at FirebaseNamespace.fn (C:\inetpub\wwwroot\portapay_node\node_modules\firebase-admin\lib\app\firebase-namespace.js:136:40)
    at new Firebase (C:\inetpub\wwwroot\portapay_node\firebase.js:45:59)
    at new PortapayServer (C:\inetpub\wwwroot\portapay_node\serverMain.js:119:25)
    at Object.<anonymous> (C:\inetpub\wwwroot\portapay_node\app.js:5:11)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47
@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants