11cb0ef41Sopenharmony_ci--- 21cb0ef41Sopenharmony_cititle: npm-edit 31cb0ef41Sopenharmony_cisection: 1 41cb0ef41Sopenharmony_cidescription: Edit an installed package 51cb0ef41Sopenharmony_ci--- 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci### Synopsis 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci```bash 101cb0ef41Sopenharmony_cinpm edit <pkg>[/<subpkg>...] 111cb0ef41Sopenharmony_ci``` 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ciNote: This command is unaware of workspaces. 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ci### Description 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ciSelects a dependency in the current project and opens the package folder in 181cb0ef41Sopenharmony_cithe default editor (or whatever you've configured as the npm `editor` 191cb0ef41Sopenharmony_ciconfig -- see [`npm-config`](npm-config).) 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ciAfter it has been edited, the package is rebuilt so as to pick up any 221cb0ef41Sopenharmony_cichanges in compiled packages. 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_ciFor instance, you can do `npm install connect` to install connect 251cb0ef41Sopenharmony_ciinto your package, and then `npm edit connect` to make a few 261cb0ef41Sopenharmony_cichanges to your locally installed copy. 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ci### Configuration 291cb0ef41Sopenharmony_ci 301cb0ef41Sopenharmony_ci#### `editor` 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ci* Default: The EDITOR or VISUAL environment variables, or 331cb0ef41Sopenharmony_ci '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems 341cb0ef41Sopenharmony_ci* Type: String 351cb0ef41Sopenharmony_ci 361cb0ef41Sopenharmony_ciThe command to run for `npm edit` and `npm config edit`. 371cb0ef41Sopenharmony_ci 381cb0ef41Sopenharmony_ci 391cb0ef41Sopenharmony_ci 401cb0ef41Sopenharmony_ci### See Also 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_ci* [npm folders](/configuring-npm/folders) 431cb0ef41Sopenharmony_ci* [npm explore](/commands/npm-explore) 441cb0ef41Sopenharmony_ci* [npm install](/commands/npm-install) 451cb0ef41Sopenharmony_ci* [npm config](/commands/npm-config) 461cb0ef41Sopenharmony_ci* [npmrc](/configuring-npm/npmrc) 47