howdyai / botkit-starter-ciscospark

A customizable starting point for building Cisco Spark bots
http://botkit.ai
MIT License
29 stars 31 forks source link

Error while running container built from dockerfile #15

Closed randypfohl closed 5 years ago

randypfohl commented 5 years ago

Error encountered when simply running container built from freshly pulled repo.

1/17/2019 6:28:46 AM/app/node_modules/botkit/lib/SlackBot.js:235
1/17/2019 6:28:46 AM            let timestamp = req.header('X-Slack-Request-Timestamp');
1/17/2019 6:28:46 AM            ^^^
1/17/2019 6:28:46 AM
1/17/2019 6:28:46 AMSyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
1/17/2019 6:28:46 AM    at exports.runInThisContext (vm.js:53:16)
1/17/2019 6:28:46 AM    at Module._compile (module.js:373:25)
1/17/2019 6:28:46 AM    at Object.Module._extensions..js (module.js:416:10)
1/17/2019 6:28:46 AM    at Module.load (module.js:343:32)
1/17/2019 6:28:46 AM    at Function.Module._load (module.js:300:12)
1/17/2019 6:28:46 AM    at Module.require (module.js:353:17)
1/17/2019 6:28:46 AM    at require (internal/module.js:12:17)
1/17/2019 6:28:46 AM    at Object.<anonymous> (/app/node_modules/botkit/lib/Botkit.js:2:16)
1/17/2019 6:28:46 AM    at Module._compile (module.js:409:26)
1/17/2019 6:28:46 AM    at Object.Module._extensions..js (module.js:416:10)
benbrown commented 5 years ago

I would guess this is related to the version of Node being installed.

randypfohl commented 5 years ago

Agreed, I was able to fix it by switching node distributions in the From field in the dockerfile. Ill send a pr over for the fix.

benbrown commented 5 years ago

thanks @randypfohl