kriasoft / aspnet-starter-kit

Cross-platform web development with Visual Studio Code, C#, F#, JavaScript, ASP.NET Core, EF Core, React (ReactJS), Redux, Babel. Single-page application boilerplate.
https://twitter.com/dotnetreact
MIT License
1.16k stars 203 forks source link

SyntaxError: Block-scoped declarations #16

Closed Cantusstar closed 8 years ago

Cantusstar commented 8 years ago

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 Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:968:3 npm-debug.log.zip

koistya commented 8 years ago

@Cantusstar are you using Node.js v6+?

scripni commented 8 years ago

@koistya Hitting the same issue, running node v4.4.7

C:\Users\andreisc\Source\Repos\aspnet-starter-kit (master) (app@0.0.0)
λ node run
C:\Users\andreisc\Source\Repos\aspnet-starter-kit\run.js:68
  let count = environments.length;
  ^^^

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 Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3

C:\Users\andreisc\Source\Repos\aspnet-starter-kit (master) (app@0.0.0)
λ node --version
v4.4.7
scripni commented 8 years ago

@koistya @Cantusstar I took a look at the documentation and saw that node v6.0+ is required for this, works great after updating

Cantusstar commented 8 years ago

@koistya @scripni Updating Node worked here as well, Thank you!!