every time I try to upgrade discord.js v12 to v13, npm reinstalls discord.js v12 and is not upgrading to v13. I tried to delete node_modules, I tried to remove discord.js from package.js and packages-lock.json and it doesn't work. I tried npm update discord.js, I tried to uninstall and reinstall discord.js and nothing works, someone, please help me.
As of the posting of this answer
To upgrade to the lastest build of v13 use
npm i discord.js@dev
This will install the master branch of the Discord.js repository. As EJBEAN stated, v13 currently is not fully public and is still in active development.
UPDATE Discord.JS v13 is now live. To update simply run
npm uninstall discord.js
Then
npm install discord.js
v13 has now been released!
To upgrade, use npm upgrade or update your dependencies in package.json:
{
"dependencies": {
"discord.js": "^13.0.0"
}
}
Take a look at the Discord.js guide for breaking changes.
The issue is caused because discord.js version 13 is not public yet, so you cannot update to the official v13 version.
In case you want to downgrade (or upgrade)
You can add the package version as a parameter npm i [packagename]@[version]. Prefix a version number with a caret (^) or a tilde (~) to specify to install the latest minor or patch version, respectively.
npm i discord.js@12.5.3
Alternatively you can install the dev release of djsv13
npm i discord.js@^13.0.0-dev.5af2ef5fbc7ad11281f38384c360ae79efe63b39