-
Notifications
You must be signed in to change notification settings - Fork 182
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
not compatible with CJS module #44
Comments
try either changing your file extension to .cjs to use the 'require' syntax, or define your project as a 'module' in your package.json, and then rather use the ES 'import' syntax. That's what worked for me. |
You can use it in a CommonJS project using dynamic import: const { Ollama } = await import('ollama') Or alternatively change your package system to ESM (set import { Ollama } from 'ollama' |
This should work now in the most recent release, |
The text was updated successfully, but these errors were encountered: