codekingpro/portable-devtools
114k
1---
2title: npm-edit
3section: 1
4description: Edit an installed package
5---
6
7### Synopsis
8
9```bash
10npm edit <pkg>[/<subpkg>...]
11```
12
13Note: This command is unaware of workspaces.
14
15### Description
16
17Selects a dependency in the current project and opens the package folder in the default editor (or whatever you've configured as the npm `editor` config -- see [`npm-config`](npm-config).)
18
19After it has been edited, the package is rebuilt so as to pick up any changes in compiled packages.
20
21For instance, you can do `npm install connect` to install connect into your package, and then `npm edit connect` to make a few changes to your locally installed copy.
22
23### Configuration
24
25#### `editor`
26
27* Default: The EDITOR or VISUAL environment variables, or
28 '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems
29* Type: String
30
31The command to run for `npm edit` and `npm config edit`.
32
33
34
35### See Also
36
37* [npm folders](/configuring-npm/folders)
38* [npm explore](/commands/npm-explore)
39* [npm install](/commands/npm-install)
40* [npm config](/commands/npm-config)
41* [npmrc](/configuring-npm/npmrc)
42 