Error when loading listener on v14

Although I know that v14 support is still experimental, I decided to give it a go and see if I could get it to work with a basic client and listener. When trying to start the bot, it gives me the following error
Error when loading 'C:\Users\medup\Documents\Blight\dist\listeners\client\ready.js': TypeError: Cannot read properties of undefined (reading 'SELECT_MENU')
at Object.<anonymous> (C:\Users\medup\Documents\Blight\node_modules\@sapphire\discord.js-utilities\dist\index.js:894:54)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
at Module.load (node:internal/modules/cjs/loader:1068:32)
at Module._load (node:internal/modules/cjs/loader:909:12)
at Module.require (node:internal/modules/cjs/loader:1092:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (C:\Users\medup\Documents\Blight\node_modules\@sapphire\decorators\dist\index.js:99:22)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
Error when loading 'C:\Users\medup\Documents\Blight\dist\listeners\client\ready.js': TypeError: Cannot read properties of undefined (reading 'SELECT_MENU')
at Object.<anonymous> (C:\Users\medup\Documents\Blight\node_modules\@sapphire\discord.js-utilities\dist\index.js:894:54)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
at Module.load (node:internal/modules/cjs/loader:1068:32)
at Module._load (node:internal/modules/cjs/loader:909:12)
at Module.require (node:internal/modules/cjs/loader:1092:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (C:\Users\medup\Documents\Blight\node_modules\@sapphire\decorators\dist\index.js:99:22)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
This is my ready.ts file
import { ApplyOptions } from '@sapphire/decorators';
import { Listener } from '@sapphire/framework';

@ApplyOptions<Listener.Options>({
once: true
})
export default class extends Listener {
public run() {
this.container.logger.info(`[Blight] Successfully logged into Discord`);
}
}
import { ApplyOptions } from '@sapphire/decorators';
import { Listener } from '@sapphire/framework';

@ApplyOptions<Listener.Options>({
once: true
})
export default class extends Listener {
public run() {
this.container.logger.info(`[Blight] Successfully logged into Discord`);
}
}
Solution:
We don't really actively support the PR like this. You're on your own and we appreciate any PRs of fixes. That said, you also need the PR version of @sapphire/discord.js-utilities...
Jump to solution
3 Replies
denyed
denyedOP2y ago
in case this is relevant:
"@sapphire/framework": "3.2.0-pr-512.244de39.0"
"discord.js": "^14.7.1"
"@sapphire/framework": "3.2.0-pr-512.244de39.0"
"discord.js": "^14.7.1"
Solution
Favna
Favna2y ago
We don't really actively support the PR like this. You're on your own and we appreciate any PRs of fixes. That said, you also need the PR version of @sapphire/discord.js-utilities
denyed
denyedOP2y ago
I managed to get it to work decorators dont seem to work atm with v14 but thats ok
Want results from more Discord servers?
Add your server