Open shotexa opened 2 years ago
Did you figure it out? I'm expecting that tslab is wrapping around node and doesn't support esm and maybe something like this could work https://github.com/standard-things/esm
Context about ESM and CommonJS : https://formidable.com/blog/2021/node-esm-and-exports/
The dynamic import() which is available in all CommonJS modules
seems to give away that the imports are trying to be loaded in a commonJS format
tslab runs in a node vm and esm cannot run in a vm
There is a similar problem in ijavascript
However they found a workaround: require("esm-hook");
then whatever require
whatever package was needed.
I'm getting the error when trying to import a library in my code using the following syntax
the error looks like this:
If that is a problem with my library and not with
tslab
kernel itself, could you tell me what it is?Node - 16.7.0 jupyter --version
OS - MacOS Monterey 12.4