Is there a command that can initialize npm's package-lock.json and update all the libraries?
With yarn, I can use the following command to update the library in one go, but is there a way to do the same with npm?
$ rm -rf node_modules yarn.lock
$ npx npm-check-updates -u
CodePudding user response:
npm uninstall <package_name>
CodePudding user response:
bash
for package in `ls node_modules`; do npm uninstall $package; done;
or simple install lastest
npm i -g npm-check-updates
ncu -u
npm install