If you accidentally execute npm i npm
it adds npm as a dependency to the package.json and adds entries to the package-lock.json.
Should I revert this? Or does it actually make sense to have npm as dependency in the package.json?
npm
or other package managers are meant to be installed globally.
If you wish to specify the minimum npm
version for your project, you could add this to package.json
"engines" : {
"npm" : ">=x.x.x"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With