Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
chuxmykel736yI'm actually new to programming. And I started with es5. And it all went well until I met es6 and wanted to rewrite some code to take advantage of the es6 features. And then, babel showed up
-
donuts238486yNode 6.7+ can handle most of the main syntax of ES6... I know because recently I enabled it on a new project at work. Needed to set esversion on JSHint though so it accepted the new syntax.
The latest stable version is like 8 I think. I was learning React which used lambdas and spread parameter, tuples. No await async though but minor issue... -
chuxmykel736y@billgates 8? I think there's a version 10LTS. Except if stable means something else to devs 🤷♂️.
And it couldn't handle imports 😭😭😭😭 -
donuts238486y@chuxmykel 10 I think has some breaking changes. I tried installing 10 locally but the tutorial book's code wouldn't compile, needed 8...
Work we use 6.7 because it's an old project -
donuts238486y@chuxmykel Actually your right, just tried a simple script but seems like by default Node doesn't use ES6 even though its supported... The reason I guess it works with Express/Babel is they can turn it on when the entire project is compiled.
-
@ganjaman Well up to this moment I could do everything I want with node. Let's see what the future brings.
Caniuse.com -
donuts238486y@chuxmykel I actually just tried out the functions i do use and basically NodeJS doesn't support import natively but it does support the ones I wanted to use.
node index.js
Hello 1, 2
Related Rants
So you need babel to run es6+ on node js because node js can't handle es6 yet. 🤔
Why can't the node guys work with the babel guys to integrate babel with node and save me the extra stress of having to figure out if my es6 code is not working because of a syntax error or because I didn't transpile properly🤷♂️
rant
node
collaboration
es6
dev
babel
transpile
frustrated
js