

Updates specific package to specific version: Updates specific package to the latest version: Updates all packages to the latest version: Npm audit (submits a description of the dependencies configured in your project to your default registry and asks for a report of known vulnerabilities) Run a security audit for all the packages: Npm update -save/-save-dev (updates and saves dependencies in package.json)

Npm outdated (this checks the registry to see if any installed packages are currently outdated) Npm install all packages to the latest versions: Npm view browser-sync versions (view package version) Update Specific Package to the Latest Version: This will uninstall it, remove the value from your package.json, and then reinstall the latest version and save the new value to your package.json. Note: the last one is no different than doing uninstall followed by install like this: npm uninstall browser-sync -save-dev or the latest and greatest by doing: npm install -save-dev or the latest 2.1.x by doing: npm install -save-dev You can install/save the latest 2.x.x by doing: npm install -save-dev In your case, it looks like you want the next major version (v2.x.x), which is likely to have breaking changes and you will need to update your app to accommodate those changes. Use npm update|yarn upgrade (without a package name) to update all modules.Use npm|yarn outdated to see which modules have newer versions.Most of the time you can just npm update (or pnpm update or yarn upgrade) a module to get the latest non breaking changes (respecting the semver specified in your package.json) (<- read that last part again).
