Skip to main content

Tree

Tree Screenshot

Introduction

The tree option will print the dependency tree for a particular Node.js package or a local project, e.g.:

pkga tree --package react

This command will print the dependency tree for the latest version of react.

Options

ArgumentDescription
--packagename and version of package e.g. react@17.0.2, will default to latest version if no version is provided
--folderpath to a local package.json on the filesystem
--typeWhich type of dependencies to traverse: dependencies or devDependencies. Defaults to dependencies.

Example Usages

pkga tree --package react@17.0.2
#omit version to default to latest version
pkga tree --package react
pkga tree --package react@17.0.2 --type devDependencies
pkga tree --folder ./path/to/package.json