Open kylebarron opened 4 years ago
I also tried putting
require('esm')
in a file called by --startup-script
, but import
still didn't work in the jupyter console.
I need to investigate what esm
does, but it doesn't seem to work with IJavascript.
I'm still testing, but to answer your original question, you can set the env variable NODE_OPTIONS
to pass any flags to node, e.g.:
$ NODE_OPTIONS="-r esm" node
Welcome to Node.js v12.16.1.
Type ".help" for more information.
> import test from './index.js'
undefined
> test
'helloworld'
When I set NODE_OPTIONS="-r esm --experimental-repl-await"
, Atom won't start. I'm guessing that conflicts with some Electron requirements.
Hello! This is a great project!
I searched in the issues and didn't find any mention of this... Is it possible to start node with
-r esm
? This preloadsesm
, and should allow usingimport
in the kernel.I.e. in the terminal I can do:
I tried to change the kernelspec options a bit, but the kernelspec starts the
ijskernel
executable, not node. Here's my kernelspec: