Skip to content

server and client share node_modules folder #1802

@xinthose

Description

@xinthose

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions