kwhitley / treeize

Converts row data (in JSON/associative array format) to tree structure based on column naming conventions.
MIT License
189 stars 24 forks source link

What's the node version required for this? #43

Closed The-Gupta closed 6 years ago

The-Gupta commented 6 years ago

I've node 4.5.

Was getting the error below -

D:\FROM_C_on_05-Jan-18\Desktop\experimentsOn_23-May-18>node
> var Treeize   = require('treeize')
D:\FROM_C_on_05-Jan-18\Desktop\experimentsOn_23-May-18\node_modules\treeize\lib\treeize.js:16
      let value = props[attribute]
      ^^^
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:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at repl:1:17
    at REPLServer.defaultEval (repl.js:262:27)
    at bound (domain.js:287:14)
>

Solution: Replace 'let' with 'var' in lib/treeize.js file.