0

I'm using the current version 12.0 of NodeJS but i am having trouble with ES6 syntax. Node doesn't understanding the syntax of ES6 like optional chaining, export & import but i need to use it in my project.

In short, how can I use ES6 syntax in NodeJS v12.0 without using TypeScript compiler? Any babel support it?

A Little Girl
  • 303
  • 3
  • 4
  • 12
  • 2
    Why not upgrade to a more recent version of NodeJS that supports those features? – Andy Feb 25 '22 at 05:37
  • @Andy The newer versions of NodeJS don't support the operating system I'm using (Windows 7) – A Little Girl Feb 25 '22 at 05:39
  • 1
    @ALittleGirl https://stackoverflow.com/a/64626035/362536 – Brad Feb 25 '22 at 05:42
  • @Brad This "trick" still not works for me. I got the error information: `The Application is only supported on windows 8.1, windows server 2012 R2, or Higher` after install it – A Little Girl Feb 25 '22 at 06:05
  • @ALittleGirl You added `NODE_SKIP_PLATFORM_CHECK` to your environment? There are folks there that said it worked as of a couple weeks ago. – Brad Feb 25 '22 at 06:34
  • It's worth noting that Node 12 is well past the point of getting security updates and I would recommend using a newer supported version. – loganfsmyth Feb 26 '22 at 00:32

0 Answers0