Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
113
rated 0 times [  118] [ 5]  / answers: 1 / hits: 15291  / 8 Years ago, mon, january 23, 2017, 12:00:00

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?


More From » node.js

 Answers
49

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


[#59237] Friday, January 20, 2017, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aidan

Total Points: 72
Total Questions: 95
Total Answers: 121

Location: Uzbekistan
Member since Sat, Feb 27, 2021
3 Years ago
aidan questions
Mon, Oct 11, 21, 00:00, 3 Years ago
Wed, Sep 29, 21, 00:00, 3 Years ago
Sun, Sep 5, 21, 00:00, 3 Years ago
Thu, Jan 16, 20, 00:00, 4 Years ago
;