npm list
for local packagesnpm list -g
for globally installed packages.
您可以通过传递特定package的name作为参数来查找其版本。 例如, npm list grunt
will result in:
projectName@projectVersion /path/to/project/folder └── grunt@0.4.1
Alternatively, you can just run npm list
without passing a package name as an argument to see the versions of all your packages:
├─┬ cli-color@0.1.6 │ └── es5-ext@0.7.1 ├── coffee-script@1.3.3 ├── less@1.3.0 ├─┬ sentry@0.1.2 │ ├── file@0.2.1 │ └── underscore@1.3.3 └── uglify-js@1.2.6
You can also add --depth=0
argument to list installed packages without their dependencies.
Find the version of an installed npm package
Related Posts
- package.json中~和^之间的区别
- npm与npx的区别
- 如何升级Node.js版本(Linux, Ubuntu, macOS)
- 删除、弃用已发布在npmjs上的packages
- Xcode Swift “Cannot find ‘MyClass’ in scope”
- Amazon S3 存储桶无法删除
- 关闭Sublime Text更新检查
- Device supports arm64-v8a, but APK only supports armeabi on device *
- npm ERR! gyp verb `which` failed Error: not found: python