I am using node v6.0.0 and wanted to use ES2016 (ES6). However I realized that the \"import\" syntax is not working. Isn\'t \"import\" fundamental to for writing modular cod
As is stated above, ES6 modules are not implemented yet.
It appears to be a non-trivial issue to implement ES6 modules in a way that would be backward-compatible with Common JS modules, which is the current Node.js module syntax.
However, there is a draft of an implementation, that introduces a new file extension - .mjs - for a files containing ES6 modules.
Also, there is a counter-proposal that present an alternative approach of declaring all files with ES6 modules in package.json like so:
{
"modules.root": "/path/to/es6/modules"
}