Open I560263 opened 3 months ago
If you are using import(), you should check your package.json to see if it has "type": "module"
I have the same issue, due to our TypeScript environment, we cannot set "type": "module"
.
Unfortunately, the only solution was to implement Mistral AI API calls using Axios
I am currently facing this error Error [ERR_REQUIRE_ESM]: require() of ES Module to a dynamic import() which is available in all CommonJS modules when I try to import MistralClient from '@mistralai/mistralai';