@sapphire/result error in v4
After migrating to Sapphire v4 and D.js v14 and fixed all breaking changes, I've still got three errors from
@sapphire/result
One of the error is:
The other two looks the same but instead of UnwrapSome
there's UnwrapOk
and UnwrapErr
in the last row
How to fix this?Solution:Jump to solution
Anyway I think the reason for your issue might be that you haven't updated TypeScript, so try updating it to 4.9.4
11 Replies
Deduplicate your dependencies. There are no current known issues in result.
Tried with
yarn dedupe
and also tried to reinstall my node_modules
, but sadly the error is still thereneed more info then because I can guarantee that if you create a fresh new project with Sapphire CLI that it wont have this error
i.e. full package.json for starters
When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stacktraces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards.
❯ For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. ❯ For an excellent video that shows how not to ask technical questions is this, watch this YouTube video by LiveOverflow. ❯ Asking technical questions (Clarkson) ❯ How to ask questions the smart way (Raymond)
I use node v16.19
Also my
package.json
:it's invalid for starters
also just curious but any particular reason you're using raw i18next + i18next-fs-backend instead of @sapphire/plugin-i18next?
because
i18next-fs-backend
has some pretty nasty bugs and performance flaws that Kyra and I fixed in @skyra/i18next-backend
which is used in the pluginSolution
Anyway I think the reason for your issue might be that you haven't updated TypeScript, so try updating it to 4.9.4
There was an old memory-cache for prisma, but I mistakenly left it in the
package.json
after migrating to prisma-redis-middleware
, and now after removing it I forgot to delete the comma 😅
I use a custom random translation functionality in various places (for example in the 8ball command)
I want make a PR to the @sapphire/plugin-i18next
, to add this functionality there as well, but I haven't had time to do it yet
Thank you, I'll check it soon ^^you can literally just
anywhere, any time, any place. Whether you use the plugin or not. We still use i18next.