Closed erturkdotgg closed 1 year ago
Try to use this instead
(async function () {
const Bard = await import('bard-ai');
that works for me for my javascript project that use require
.
you need to use like this
const Bard = require('fix-esm').require('bard-ai').default;
that works
Prerequisites
bard-ai
Bug Description
I was using bard-ai with this instead of import: const Bard = require("fix-esm").require("bard-ai");
It was working great. But after the bard-ai v2:
It started to give this error: TypeError: Bard is not a constructor
Is it still possible for me to use it? I was be able to use it before the v2. Currently impossible for me to use import.
Reproduction Steps
Use fix-esm.
Other information
No response
Occurance Rate
I can reproduce this bug 100% of the time.