__importStar is not defined

Hey! I am using a star import in my bot but whenever I try to run the dev script, it gives me the following error:
const dotenv = __importStar(require("dotenv"));
ReferenceError: __importStar is not defined
const dotenv = __importStar(require("dotenv"));
ReferenceError: __importStar is not defined
I guess it is more a TypeScript related issue. This is the line that's causing it:
import * as dotenv from 'dotenv';
import * as dotenv from 'dotenv';
1 Reply
Favna
Favna17mo ago
add import 'tslib' at the top of your entry point file And add that dependency ofc
Want results from more Discord servers?
Add your server