I am using the following command to look up versions of the packages that I have.
npm view <packagename> versions
The result that I get back is as follows
'2.4.0-2016-10-06-6743',
'2.4.0-2016-10-07-6750',
'2.4.0-2016-10-07-6751',
'2.4.0-2016-10-07-6754',
'2.4.0-2016-10-07-6755',
'2.4.0-2016-10-10-6763',
'2.4.0-2016-10-11-6770',
'2.4.0-2016-10-11-6790',
'2.4.0-2016-10-12-6799',
'2.4.0-2016-10-12-6800',
'2.4.0-2016-10-13-6806',
'2.4.0-2016-10-13-6807',
'2.4.0-2016-10-13-6808',
'2.4.0-2016-10-14-6810',
... 37 more items ]
I want to get all the results as you can see there are 37 more items
which are not shown.
How can I get all the results.
I am using windows command prompt as well as the gitbash tool on windows.
Use the npm list to show the installed packages in the current project as a dependency tree. Use npm list --depth=n to show the dependency tree with a specified depth. Use npm list --prod to show packages in the dependencies . Use npm list --dev to show packages in the devDependencies .
Tarball is a compressed file format. You need to unpack it before running the npm command. From: http://www.rebol.com/docs/unpack-tar-gz.html. To unpack a tar.gz file, you can use the tar command from the shell.
If you haven't installed npm, with the current public API, you can also access the information about a package in the npm registry from the URL https://registry.npmjs.org/<package-name>/ . Then you can navigate the JSON at versions > (version number) > dist > tarball to get the URL of the code archive and download it.
You can get npx now by installing [email protected] or later — or, if you don't want to use npm, you can install the standalone version of npx! It's totally compatible with other package managers, since any npm usage is only done for internal operations.
The general syntax for running npm-view is as shown below. The npm view command shows the data about a package and prints it to the stream that is referenced by the outfd config, which is stdout by default. If you want to show the package registry for the vue package, you can do something like this:
To view the information of a package, you typically go to the npmjs.com website, find the package name, and display its information. The npm CLI tool provides the npm view command that allows you to quickly show the information on a package on the terminal. Introduction to npm view Command The npm view command returns the information on a package:
Introduction to npm list command The npm list command outputs installed packages and their dependencies of the current project as a tree-structure to the stdout:
Let’s start by creating a sample project and installing some packages. First, create a new directory called npm-demo and run the npm init command: Second, install the express and mongoose packages by running the following commands: Third, install the morgan package as a development dependency by using the npm install with the --save-dev flag:
try adding --json
to the command
npm view <packagename> versions --json
This is a change to the behavior of util.inspect() in newer versions of Node.js (I'm guessing – this isn't behavior that the npm CLI team changed). If you want to get the full list, and also want to ensure that it's parseable, just add --json to the command, to get the raw output of JSON.stringify() applied to that piece of the package's metadata.
https://github.com/npm/npm/issues/13376#issuecomment-232525623
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