New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use JupyterLab packages in node #12518
Comments
For reference this should work out of the box with Bun, a new JavaScript runtime which was recently a few months ago: https://bun.sh/ |
Good observation, but bun is far from stable for production use. Additionally, all of these modules should be properly configured to build as esm and cjs. If you are looking for a way to streamline this I'd be happy to help. |
Problem
I would like to use JupyterLab packages in node. But if I run node with the following file (after installing
@jupyterlab/shared-models
withnpm
):I get:
If I add
"type": "module"
inpackage.json
, I get:If I change the file with:
I get:
If I add
"type": "module"
innode_modules/@jupyterlab/shared-models/package.json
, I get:If I change
node_modules/@jupyterlab/shared-models/lib/index.js
to the following (adding.js
):I get:
If I change back to:
It works!
Proposed Solution
It looks like the needed changes were:
"type": "module"
to each package'spackage.json
.js
to everyexport * from './x';
But I don't know what I'm doing 😄
The text was updated successfully, but these errors were encountered: