-
Notifications
You must be signed in to change notification settings - Fork 31
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
Error [ERR_REQUIRE_ESM]: require() of ES Module... #35
Comments
This isn't a bug of Bard, just a general JavaScript error. Try changing your |
Yep! |
Still not working. |
try this async getBardRes(text) {
const importDynamic = new Function(
'modulePath',
'return import(modulePath)',
);
const { init, askAI } = await importDynamic('bard-ai');
await init(COOKIE_KEY);
return await askAI(text);
} |
@gelevanog well, i tried this but it throws Error like this. I comment |
I used NestJS and my os is ubuntu. |
Hello!
I'm trying to implement a short typescript script to play around, but somehow I am not able to get it running.
Here are the most important files.
When I try
npm run start
i get this:
Any idea why? I'm not sure if i understand the error.
The text was updated successfully, but these errors were encountered: