And run it like: node -r esm --experimental-repl-await console.js
When I trying to import a module I get this:
app > import { User } from './models/user'
Thrown:
import { User } from './models/user'
^^^^^^
SyntaxError: Cannot use import statement outside a module
Is there any chance to get the code above to work without errors?
Thanks!
Hi!
In the documentation I see:
But I want to customize some configuration options in REPL. So, I have
console.js
file bellow:And run it like:
node -r esm --experimental-repl-await console.js
When I trying to import a module I get this:
Is there any chance to get the code above to work without errors? Thanks!