if your package.json is uptodate, then you see there the versions of whatever you have installed. You can read https://docs.npmjs.com/cli-documentation/ for better knowledge.
If you have visual code, then there are extensions that helps with npm.
Also you can do it manually in package.json, if you know exactly the version.
for example you have
and you know that 4.0.0-rc.2 exist, than change it by hand.
Do not forget to update it on commandline inside your folder
Also check on npm documentation what ~ ^ etc. means.
Best regards, anna-liebt