0

we have fire base database , and server is implemented , in node js , we are connecting and updating ,saving data in through node js server , to fire base database . In in local environment (windows 7 ) , but after deploying in to compute engine ,Linux Debian server , it is giving promise is not defined error.

error message is , Promise is not defined in firebase app.js 17 line

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807

1 Answers1

0

You seem to be running an old version of Node that doesn't have native Promise object defined. You may need to start your program with something like:

var Promise = require('bluebird');

and install bluebird with npm install bluebird --save

or to use some polyfill like:

Another option would be to upgrade Node on the server. Promise object was available in Node 0.12 and you shouldn't even use that any more, not to mention anything older. For Promise support in Node see:

See this answers for details on how to do that:

Community
  • 1
  • 1
rsp
  • 107,747
  • 29
  • 201
  • 177