Any idea why is this happening?
I updated the packages and the types got messed up
Solution:Jump to solution
Remove @sapphire/pieces from your dependencies and just let it be pulled in as a transitive dependency.
13 Replies
You probably have two versions of
@sapphire/pieces
, since it was updated and none of the other packages have updated for that version yet.
If you’re using Yarn, simply run yarn dedupe
. If you’re using npm or pnpm, check instructions on how to hoist Sapphire’s packages so only one version of each is installed.I deleted
node_modules
folder fully and redid yarn install
didnt fix itThat’s yarn v1, v3/v4 is more stable and also what we use (and works better)
Yarn v4 is new version of Yarn that we recommend switching to as Yarn v1 has long since been deprecated.
"But I don't see any update on [source]?"That is correct. Yarn v4 is installed through Yarn itself. You configure Yarn v4 on a per-project basis. How you installed Yarn globally is largely irrelevant to this (corepack, volta, something else). How to install Yarn v4 for your project? Simply write: This will download the new Yarn v4 binary and put in
.yarn/releases
, you should push this to your Git repository. It will also create a .yarnrc.yml
file which configures the path which you should also commit.
Next you probably also want to run the following 2 commands:
This will add to your .yarnrc
file:
This ensures you have a more traditional experience with node_modules
and a global cache.
The next step is to nuke your node_modules
and yarn.lock
and run yarn install
Then some final adjustments. Put this in you .gitignore
:
And anywhere in your scripts in package.json where you use *
you should wrap it in extra "
For example:
Mind you this last thing is a good thing to add regardless of script runner / package bundler because it ensures the glob is performed by the library and not by your shell, which may differ when people develop on different operating systems.
In short, the command to set everything up you can run:
i did everything
Didnt work
Show code (package.json), what package manager you’re using, etc
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)
https://hastebin.skyra.pw/pusemodalu.json
This is the package json
anything else I can add? im bad at asking questions im sorry
Solution
Remove @sapphire/pieces from your dependencies and just let it be pulled in as a transitive dependency.
And also reload your VS code / typescript server
alright
ill try that
that fixed it
ty