ReferenceError: Promise is not defined
I am following the tutorial http://graphql.org/docs/getting-started/,
and when I tried to hit the http://localhost:3000/graphql, I get the error like this:
ReferenceError: Promise is not defined at /gls16_api/node_modules/express-graphql/dist/index.js:66:9 at Layer.handle as handle_request at trim_prefix (/gls16_api/node_modules/express/lib/router/index.js:312:13) at /gls16_api/node_modules/express/lib/router/index.js:280:7 at Function.process_params (/gls16_api/node_modules/express/lib/router/index.js:330:12) at next (/gls16_api/node_modules/express/lib/router/index.js:271:10) at expressInit (/gls16_api/node_modules/express/lib/middleware/init.js:33:5) at Layer.handle as handle_request at trim_prefix (/gls16_api/node_modules/express/lib/router/index.js:312:13) at /gls16_api/node_modules/express/lib/router/index.js:280:7
anyone can help?
Your node version is too old (maybe 0.10, 0.11), so you should upgrade your node or provide a Promise polyfill.
@chentsulin has your solution - Promise was added to node in a more recent version than one you're probably running now.