akairo does not support ES6 syntax
See original GitHub issueUsing latest master & djs master Node 13.11.0:
import { AkairoClient } from 'discord-akairo';
results in
SyntaxError: The requested module 'discord-akairo' does not provide an export named 'AkairoClient'
as workaround you have to do
import Akairo from 'discord-akairo';
class GideonClient extends Akairo.AkairoClient {...
also the commandhandler uses require()
on the files instead of import
, resulting in
Error: [ERR_REQUIRE_ESM] [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\Users\Adrian\code\Gideon\akairo\cmds \admin\abm.js
require() of ES modules is not supported.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
"es6" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >ES6 syntax examples - discord.js Guide
If you check the code above, it's currently doing things like 'Guild name: ' + interaction.guild.name and 'Your username: ' + interaction.user.
Read more >Untitled
Discord doesn't allow you to change the font by default, but using this generator ... are just those available through the markdown syntax....
Read more >Untitled
As we are exploiting the syntax highlighting, the colors you can use are limited. js doesn't officially support using client. Find the Discord...
Read more >discordjs bot github
Discord bot draft that does not contain ready-made commands, compatible with discord. ... The syntax of the above command can be found here....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We could maybe allow
cjs
andmjs
extensions, combined with a check: if it’s anmjs
, weawait import
, otherwise werequire
. As for the importing of Akairo, we could maybe do something like discordjs/discord.js#3998.import
does not support reloading as of the moment. Its not a deal breaker, but I’d rather not touch it for now.