I'm building something with Webpack to transpile and bundle few JS files. However, I'd like to know which version I'm using.
Let's suppose that I have the it installed globally. How would I do it without checking package.json
?
Due to my reputation, I am unable to comment. But quickly wanted to point out as suggested above in the right answer:
Alternate method:
npm view webpack version
will only show the latest webpack
that is available to download from the registry. It will not show the installed version.
(without dependencies)
For globally installed packages: npm list -g --depth=0
For locally installed packages: npm list --depth=0
(with dependencies)
For globally installed packages: npm list -g
For locally installed packages: npm list
Source: Find the version of an installed npm package
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