I just installed a couple of packages to start working with Redux:
npm install --no-optional --save-dev redux-devtools
npm install --no-optional --save react-redux
Then I wanted to make sure everything is installed, so I checked with npm ls:
$ npm ls react redux
MyProject@ /home/me/projects/myproject
├── [email protected]
└── [email protected]
Yeah, they are here!
However, I wonder if there is a way to check all the packages starting with re. Both of these commands:
npm ls re*
npm ls re
Returned the same error:
MyProject@ /home/me/projects/myproject
└── (empty)
npm ERR! code 1
I thought npm search could make it, but as I understand it looks for available packages, not only the ones that you have installed in your machine.
$ npm search re*
NAME DESCRIPTION AUTHOR
requirements-txt requirements-txt - generate requirements.txt (python… =russiani
So: is there a way with npm ls to provide a pattern to check the packages that are installed and match it?
How about piping to grep?
$ npm ls | grep 'lod.*'
└── [email protected]
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