Skip to content
Advertisement

Tag: express

Firebase function deploy fails with requiring external code

I am trying to re-use existing Express application and basically port it to firebase functions. I have a project structure like this: /src/app/index.js /functions/index.js The whole set up works well when using firebase emulators:start. I can call the functions and everything works properly. However I am unable to deploy the functions as I get this error message: Function failed on

Node.JS – Product is not a constructor error

My code is as follows and gets me “message”: “Product is not a constructor” using postman. Router seems to be properly configured but now I don’t know what is the issue. File product constructor is placed at the right direction. When running node server I get no errors in terminal. product constructor Router for POSTS Answer It should be module.exports

Advertisement