1

In my node.js application I use Promises very frequently. When working with the official node.js implementation V4 I don't have any problems. Node supports Promises since 0.13 natively.

When I switch to IBM SDK for Node.js Version 4 thats contained in the IBMNode Docker container (FROM registry.eu-gb.bluemix.net/ibmnode:latest) I get the following error when running my application: ReferenceError: Promise is not defined

Why does IBM Node.js not support Promises natively and how can I enable native support without having to use a Promise npm package and refer to it in my code?

ralphearle
  • 1,696
  • 13
  • 18
htammen
  • 66
  • 5

1 Answers1

0

In your Dockerfile, please try setting FROM ibmnode:v4 instead of FROM ibmnode:latest. Although they should refer to the same version, it may be possible that you're somehow accidentally getting 0.12.x.

Sai Vennam
  • 537
  • 2
  • 8
  • Thank you for your answer but this will not work, cause ibmnode:lastet and ibmnode:4 point to the same image. So I will spare my time and will not test this. `Image Id Created Virt Size Image Name` *e65c0c2d613bd95b55024a5e2cc4e5fb88ed Feb 4 14:34:56 2016 434768132 registry.eu-gb.bluemix.net/ibmnode:latest` `e65c0c2d613bd95b55024a5e2cc4e5fb88ed Feb 4 14:34:56 2016 434768132 registry.eu-gb.bluemix.net/ibmnode:v4` – htammen Feb 17 '16 at 13:51