stuyy / slappey

Discord Bot Project Generator
219 stars 50 forks source link

Error while compiling typescript. #53

Closed unloopedmido closed 3 years ago

unloopedmido commented 3 years ago

This is the error:

(node:32588) UnhandledPromiseRejectionWarning: TSError: ⨯ Unable to compile TypeScript:
src/utils/structures/BaseCommand.ts:12:12 - error TS1243: 'async' modifier cannot be used with 'abstract' modifier.

12   abstract async run(client: DiscordClient, message: Message, args: Array<string> | null): Promise<void>;

How to fix it: In the part where it says this abstract async run(client: DiscordClient, message: Message, args: Array<string> | null): Promise<void>, You must remove the async there.

daanbreur commented 3 years ago

What compilertarget are you using? on "target": "ES6" do i not have that issue

unloopedmido commented 3 years ago

The problem was that slappey typescript doesn't come with a tsconfig file. And when using tsc --init, the target becomes "ES6" @stuyy.