javascript - Syntax error in one of my included modules when pushed to BlueMix -


i have node.js application leverages watson_developer_cloud.

the application works fine when run locally, wen deploy bluemix tells me there syntax errors in watson libraries. complaining "illegal use of const in strict mode", changed start command "node --harmony app.js".

now error is:

  2017-08-15t11:36:31.73+0100 [app/proc/web/0] err /home/vcap/app/node_modules/watson-developer-cloud/language-translation/v2.js:109    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err   (const type in inputtypes) {    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err                   ^^    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err syntaxerror: unexpected token in    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ module._compile (module.js:439:25)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ object.module._extensions..js (module.js:474:10)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ module.load (module.js:356:32)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ function.module._load (module.js:312:12)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ module.require (module.js:364:17)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ require (module.js:380:17)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ object.<anonymous> (/home/vcap/app/node_modules/watson-developer-cloud/index.js:37:33)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ module._compile (module.js:456:26)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ object.module._extensions..js (module.js:474:10)    2017-08-15t11:36:31.73+0100 [app/proc/web/0] err     @ module.load (module.js:356:32) 

any ideas how can solve this? (as said works fine locally)

thanks tip.

my package.json specified node version of "0.10.x" in engines section (it old sample inherited). when edited 6.11.1 started work fine.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -