node.js - Running Node app with Spy.js does not recognize variables defined with let -


i'm trying run simple node app has global variable defined let , initialized in function , used in (something following code)

let some_variable;  a.dosomething(value => {     some_variable = value;     dosomethingelse(); });  function dosomethingelse() {     // error     console.log(some_variable); } 

when running node app command line or webstorm, goes when trying run spy.js, doesn't recognize some_variable , says some_variable not defined.

i tried running --harmony flag doesn't seem make difference.

when changing let some_variable var some_variable seems work, require me change code of entire app profiled spy.js doesn't sound idea.

any ideas how make spy.js recognize let variables? missing simple configuration flag?

(node version 6.10.1)


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -