main
@reggi/path-to-regexp
dependabot/npm_and_yarn/main/copy-to-clipboard-4.0.2
dependabot/npm_and_yarn/main/eslint-10.4.0
dependabot/npm_and_yarn/main/npmcli/eslint-config-7.0.0
dependabot/npm_and_yarn/main/proc-log-7.0.0
dependabot/npm_and_yarn/npm_and_yarn-826852524d
dependabot/npm_and_yarn/npm_and_yarn-ab9a7f4bc2
deprecate-totp-2fa
dhei/classic-tokens
gat-bypass-2fa-docs
jpg619/fix-accessibility-content-flow
jpg619/version-bump-tar-2
kartykp/gat-bypass-2fa-docs
kartykp/upgrade-path-to-regex
main
maitxn/version-bump-tar
patch-1
reggi/cache-based-on-version
reggi/dev-engines
reggi/fix-transform-prettier
reggi/overrides
update-search-sensitivity
| 1 | --- |
| 2 | title: npm-explore |
| 3 | section: 1 |
| 4 | description: Browse an installed package |
| 5 | github_repo: npm/cli |
| 6 | github_branch: release/v7 |
| 7 | github_path: docs/content/commands/npm-explore.md |
| 8 | redirect_from: |
| 9 | - /cli-documentation/v7/cli-commands/explore |
| 10 | - /cli-documentation/v7/cli-commands/npm-explore |
| 11 | - /cli-documentation/v7/commands/explore |
| 12 | - /cli-documentation/v7/commands/npm-explore |
| 13 | - /cli-documentation/v7/explore |
| 14 | - /cli-documentation/v7/npm-explore |
| 15 | - /cli/v7/cli-commands/explore |
| 16 | - /cli/v7/cli-commands/npm-explore |
| 17 | - /cli/v7/commands/explore |
| 18 | - /cli/v7/explore |
| 19 | - /cli/v7/npm-explore |
| 20 | --- |
| 21 | |
| 22 | ### Synopsis |
| 23 | |
| 24 | ```bash |
| 25 | npm explore <pkg> [ -- <command>] |
| 26 | ``` |
| 27 | |
| 28 | Note: This command is unaware of workspaces. |
| 29 | |
| 30 | ### Description |
| 31 | |
| 32 | Spawn a subshell in the directory of the installed package specified. |
| 33 | |
| 34 | If a command is specified, then it is run in the subshell, which then immediately terminates. |
| 35 | |
| 36 | This is particularly handy in the case of git submodules in the `node_modules` folder: |
| 37 | |
| 38 | ```bash |
| 39 | npm explore some-dependency -- git pull origin master |
| 40 | ``` |
| 41 | |
| 42 | Note that the package is _not_ automatically rebuilt afterwards, so be sure to use `npm rebuild <pkg>` if you make any changes. |
| 43 | |
| 44 | ### Configuration |
| 45 | |
| 46 | #### `shell` |
| 47 | |
| 48 | - Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows |
| 49 | - Type: String |
| 50 | |
| 51 | The shell to run for the `npm explore` command. |
| 52 | |
| 53 | ### See Also |
| 54 | |
| 55 | - [npm folders](/cli/v7/configuring-npm/folders) |
| 56 | - [npm edit](/cli/v7/commands/npm-edit) |
| 57 | - [npm rebuild](/cli/v7/commands/npm-rebuild) |
| 58 | - [npm install](/cli/v7/commands/npm-install) |