For those of you following along in your own ecosystem using Node JS: You’re not crazy, Node currently doesn’t support the export default / import syntax for modules. It seems to work fine with almost all other ES6 syntax, just not this. So if you’re trying to implement something server side using Node, you’ll have to either transpile back to ES5 or use the ES5 module.exports / require() for module sharing.
for more:
Hey there!
I am working on the Intermediate export modules.Could you please elaborate on this part of the instruction ?
" When using ES6 syntax, we use export default in place of module.exports . Node.js doesn’t support export default by default, so module.exports is usually used for Node.js development and ES6 syntax is used for front-end development"
What is reference to Node.js, and EC6 and how are these connected ?
Can someone explain how ‘export default’ and syntax that can export modules does not need you to tell it where to export to? Is a new file created, or some default file?
Thanks
Yes. I coded this in the same format as you did. I did not realize there was a different way to code this until I saw the “Hints”. I’m glad I wasn’t alone coding in this method.
It just allows it to be exported, so you don’t have to tell it where to. When you go to import it elsewhere you have to specify where you’re importing from.
I answer to my own question because I understood we added a new property after and it’s part of the NEsted objects lessons
It’s seems so far away right now !