NPM (Node Package Manager)
Updating Node packages
- Firebase Cloud Fucntions
- Angular Project
Navigate to the folder with the
package.jsonfile and the
Note: If there is a new minor or patch release and we type
npm update, the installed version is updated, and the package-lock.json file diligently filled with the new version.
- To view outdated packages:
$ npm outdated
- To update to a new major version all the packages, install the npm-check-updates package globally:
$ npm install -g npm-check-updates
then run the updates:
$ ncu -u
this will upgrade all the version hints in the package.json file, to dependencies and devDependencies, so npm can install the new major version.
Installing the updates.
If you just downloaded the project without the node_modules dependencies and you want to install the shiny new versions first, just run
If you already had a node modules folder and just want to update it, then run:
$ npm update
npm updatein the demo is blank because nothing needed to be updated since we just ran npm install.
- Test if your project runs. If your project does not run, try deleting the
node_modeulesdirectory and the
package.lockthen recreating them with the following command (run the command in the directory where the
$ npm install
Note: If you have an error with a specific package, it may help to remove the package from node modules with
npm uninstall <package name> then running
npm install again.
- 2020.06.21 Created how to update node
- 2020.06.26 Updated file name to
NPMand updated description