Open Trippnology opened 5 months ago
Please try again with 0.2.22 from the homepage: https://lmstudio.ai
Thanks for the report. We are still investigating how to add automatic esm support. For now, please use the 'index.mjs' entry point (as you have discovered).
import { LMStudioClient } from '@lmstudio/sdk/index.mjs';
No problem. As per the error message, this also works:
import SDK from '@lmstudio/sdk';
const { LMStudioClient } = SDK;
This may help with offering both CJS and ESM options: Create npm package with CommonJS and ESM support in TypeScript
When I import the SDK like this, I get the following error:
Adding
/index.mjs
does work though: