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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

Ansible warning on jinja2 braces on when -

html - How to custom Bootstrap grid height? -