2025-04-10 14:36:22 -07:00
.TH "NPM-EDIT" "1" "April 2025" "NPM@11.3.0" ""
2011-11-26 09:21:03 -08:00
.SH "NAME"
2022-12-06 22:18:33 -05:00
\fB npm-edit\fR - Edit an installed package
.SS "Synopsis"
2014-09-24 14:41:07 -07:00
.P
.RS 2
2014-11-04 15:08:12 -08:00
.nf
2022-12-06 22:18:33 -05:00
npm edit <pkg>\[ lB]/<subpkg>...\[ rB]
2014-11-04 15:08:12 -08:00
.fi
2014-09-24 14:41:07 -07:00
.RE
2021-03-23 14:58:11 -04:00
.P
2022-12-06 22:18:33 -05:00
Note: This command is unaware of workspaces.
.SS "Description"
2014-09-24 14:41:07 -07:00
.P
2022-12-06 22:18:33 -05:00
Selects a dependency in the current project and opens the package folder in the default editor (or whatever you've configured as the npm \fB editor\fR config -- see \fB \fB npm-config\fR \fR \fI \(la npm-config\(ra \fR .)
2011-11-26 09:21:03 -08:00
.P
2022-12-06 22:18:33 -05:00
After it has been edited, the package is rebuilt so as to pick up any changes in compiled packages.
2011-11-26 09:21:03 -08:00
.P
2022-12-06 22:18:33 -05:00
For instance, you can do \fB npm install connect\fR to install connect into your package, and then \fB npm edit connect\fR to make a few changes to your locally installed copy.
.SS "Configuration"
.SS "\fBeditor\fR"
2014-09-24 14:41:07 -07:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
Default: The EDITOR or VISUAL environment variables, or '%SYSTEMROOT%\[ rs]notepad.exe' on Windows, or 'vi' on Unix systems
.IP \(bu 4
2021-05-20 15:54:50 -04:00
Type: String
2022-12-06 22:18:33 -05:00
.RE 0
2014-09-24 14:41:07 -07:00
2011-11-26 09:21:03 -08:00
.P
2022-12-06 22:18:33 -05:00
The command to run for \fB npm edit\fR and \fB npm config edit\fR .
.SS "See Also"
2014-09-24 14:41:07 -07:00
.RS 0
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-05 14:55:08 -05:00
npm help folders
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-18 21:01:39 +02:00
npm help explore
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-18 21:01:39 +02:00
npm help install
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-18 21:01:39 +02:00
npm help config
2022-12-06 22:18:33 -05:00
.IP \(bu 4
2019-11-05 14:55:08 -05:00
npm help npmrc
2022-12-06 22:18:33 -05:00
.RE 0