node-wit
node-wit copied to clipboard
Node v5.5.0: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
I'm getting the following error when running an app using node-wit on v5.5.0 of node:
node --harmony_destructuring main.js
/wit-project/node_modules/node-wit/lib/interactive.js:7
let context = typeof initContext === 'object' ? initContext : {};
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/wit-project/node_modules/node-wit/index.js:4:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
Taking a look at node-wit/lib/interactive.js, sure enough there is no 'use strict'; at the top of the file like the rest. Manually adding it resolves the issue.
Looks like #82 fixes this, whenever it gets merged.