If I remove a package from my project using the following command:
npm uninstall react
The entry for this package in the package.json file does not disappear. Then, when I install a different version of this package like so:
npm install <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3a485f5b594e7a0b0f140a">[email protected]</a>
The new package version gets installed in node_modules, but the version in package.json remains unchanged. It still shows the old version that was present before the uninstallation.
Is there a way to delete/update/change the version directly in package.json via terminal?