Any idea why is this happening?

I updated the packages and the types got messed up
Solution:
Remove @sapphire/pieces from your dependencies and just let it be pulled in as a transitive dependency.
Jump to solution
13 Replies
⸸⛧Stealth⛧⸸
⸸⛧Stealth⛧⸸OP13mo ago
No description
kyra
kyra13mo ago
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.
⸸⛧Stealth⛧⸸
⸸⛧Stealth⛧⸸OP13mo ago
No description
⸸⛧Stealth⛧⸸
⸸⛧Stealth⛧⸸OP13mo ago
I deleted node_modules folder fully and redid yarn install didnt fix it
kyra
kyra13mo ago
That’s yarn v1, v3/v4 is more stable and also what we use (and works better)
Spinel
Spinel13mo ago
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:
yarn set version berry
yarn set version berry
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:
yarn config set enableGlobalCache true
yarn config set nodeLinker node-modules
yarn config set enableGlobalCache true
yarn config set nodeLinker node-modules
This will add to your .yarnrc file:
enableGlobalCache: true
nodeLinker: node-modules
enableGlobalCache: true
nodeLinker: node-modules
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:
# Yarn files
.yarn/install-state.gz
.yarn/build-state.yml
# Yarn files
.yarn/install-state.gz
.yarn/build-state.yml
And anywhere in your scripts in package.json where you use * you should wrap it in extra " For example:
{
"format": "prettier --write \"src/**/*.ts\""
}
{
"format": "prettier --write \"src/**/*.ts\""
}
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:
yarn set version berry && yarn config set enableGlobalCache true && yarn config set nodeLinker node-modules && echo "" >> .gitignore && echo "# Yarn files" >> .gitignore && echo ".yarn/install-state.gz" >> .gitignore && echo ".yarn/build-state.yml" >> .gitignore
yarn set version berry && yarn config set enableGlobalCache true && yarn config set nodeLinker node-modules && echo "" >> .gitignore && echo "# Yarn files" >> .gitignore && echo ".yarn/install-state.gz" >> .gitignore && echo ".yarn/build-state.yml" >> .gitignore
⸸⛧Stealth⛧⸸
⸸⛧Stealth⛧⸸OP13mo ago
i did everything Didnt work
Favna
Favna13mo ago
Show code (package.json), what package manager you’re using, etc
Spinel
Spinel13mo ago
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)
⸸⛧Stealth⛧⸸
⸸⛧Stealth⛧⸸OP13mo ago
https://hastebin.skyra.pw/pusemodalu.json This is the package json anything else I can add? im bad at asking questions im sorry
Solution
Favna
Favna13mo ago
Remove @sapphire/pieces from your dependencies and just let it be pulled in as a transitive dependency.
Favna
Favna13mo ago
And also reload your VS code / typescript server
⸸⛧Stealth⛧⸸
⸸⛧Stealth⛧⸸OP13mo ago
alright ill try that that fixed it ty
Want results from more Discord servers?
Add your server