'"discord.js"' has no exported member named 'WebhookEditMessageOptions'. Did you mean 'WebhookFetchM
Error: '"discord.js"' has no exported member named 'WebhookEditMessageOptions'. Did you mean 'WebhookFetchMessageOptions'
Project Created with
sapphire new
- typescript complete
I just changed WebhookEditMessageOptions with WebhookEditMessageOptions
is it ok ?23 Replies
Did you change anything after cli generated your template?
yeh
WebhookEditMessageOptions to WebhookFetchMessageOptions
Solution
First of all, it's WebhookMessageEditOptions
Secondly, this is why you always first update your dependencies.
I dont get what the solution is, I have the same Issue when building. I have the latest version of discord-js-utilities (according to rerovate at least) and just installed all the dependencies again.
just update the dependencies
yarn up
this does nothing
my dependencies:
dedupe your dependencies
and update discordjs
dedupe?
like tirup said, update your dependencies
mine solved by updating
uninstall and install again can also solve *i think
same as deduping but chilli should first update their deps
upgrading djs fixed it
now start keeping all your deps up-to-date
thats why i have renovate installed for exactly this
https://github.com/BirthdayyBot/BirthdayyBotSapphire/blob/develop/renovate.json
good lord
that config is way more complex than that of sapphire lol
feels like you are extending stuff you dont even need
i have that feeling too, but dont change things on a running system
for example you dont even have a mono repo
then why use mono repo config
I'm getting this same exact problem with a brand new project using the TS Complete template from
sapphire new
- my installation of @sapphire/cli
is brand new as well. I am using NPM and running npm update
and installing the latest version of discord.js are not helping. Please advise.
If I should create my own thread please let me know.
Essentially all I did was put my token in the .env then try to run npm run dev
and immediately got this same exact error.
Okay I'm not sure what I did, but it seems that specifically using npm i [email protected]
(despite npm i discord.js
installing the exact same version as the former) works. Will test again in a moment to confirm.
Nope, that wasn't it alone. Ffs
Okay, I figured it out.
The template installs @sapphire/discord.js-utilities
version 6.0.3
.
This version will not work, even with the discord.js
version that also gets installed, which is 14.7.1
.
I had to manually update it to 6.0.4
using npm i @sapphire/discord.js-utilities@latest
, because npm i @sapphire/discord.js-utilities
would not install the newer version.
Is this not a bug with the template? It shouldn't be using broken deps lolThat's because npm install never updates dependencies when they're already installed. You need to run npm update for that.
That said, when using npm you should either use
npx npm-upgrade
or install the version lens vscode extension. Much more reliable
As for why the sample installs outdated dependencies, that's because the examples are static rather than dynamically generated. Same as something like how NextJS does it.I will try this next time. It didn't seem like
npm update
did anything
Thank you