![]() The flag is used to limit the depth of the dependency tree that can be displayed. If you want to display all installed top-level packages without their dependencies, add the –depth=0 flag. Of course, you can just go to the package-lock.json file, but manually checking the packages’ versions will involve some visual scanning. If you want to see a tree-structured list of all your locally installed packages, including their dependencies, run the following command: npm list How To Know The Specific Version of An Installed Package If you want to know the specific latest version of a package available on the npm registry, run the following command: npm view versionįor example, here is how you can check the latest version of the Renovate package: Or, you can simply run the following command to check the available versions on the npm registry: npm view versions If you want to know the exact version of a package to install, you can simply search for it on the npm public registry database. If you want to install it globally, you can simply add the -g (short for –global) flag: npm install -g To Know Package Versions Available ![]() Here’s the command to run for npm install specific version: npm install above command will install the particular package version you want, alongside any packages that it depends on.įor example, to install a specific version of Renovate, you can run the following command: npm install you can use the shortened version of the command: npm i above command will install Renovate version 20.5.1 locally. You can simply specify the version using the syntax. In such cases, installing an exact package version could best suit your needs. ![]() However, what if the latest version causes some breaking changes to your application, or you just need a different version for any other reason? Renovate is a resourceful package that allows you to automate your dependency updates. ![]() You can use the npm install command to download and install a package on your development environment.īy default, the npm install command fetches the latest available version of the specified package-in this case, it’s Renovate version 24.52.1, as of the time of this writing. Updating versions of Node.js packages manually? There’s an easier way How To Install A Specific Version Of A Package ![]()
0 Comments
Leave a Reply. |