11cb0ef41Sopenharmony_ci--- 21cb0ef41Sopenharmony_cititle: npm-link 31cb0ef41Sopenharmony_cisection: 1 41cb0ef41Sopenharmony_cidescription: Symlink a package folder 51cb0ef41Sopenharmony_ci--- 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci### Synopsis 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci```bash 101cb0ef41Sopenharmony_cinpm link [<package-spec>] 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_cialias: ln 131cb0ef41Sopenharmony_ci``` 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ci### Description 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ciThis is handy for installing your own stuff, so that you can work on it and 181cb0ef41Sopenharmony_citest iteratively without having to continually rebuild. 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_ciPackage linking is a two-step process. 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_ciFirst, `npm link` in a package folder with no arguments will create a 231cb0ef41Sopenharmony_cisymlink in the global folder `{prefix}/lib/node_modules/<package>` that 241cb0ef41Sopenharmony_cilinks to the package where the `npm link` command was executed. It will 251cb0ef41Sopenharmony_cialso link any bins in the package to `{prefix}/bin/{name}`. Note that 261cb0ef41Sopenharmony_ci`npm link` uses the global prefix (see `npm prefix -g` for its value). 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ciNext, in some other location, `npm link package-name` will create a 291cb0ef41Sopenharmony_cisymbolic link from globally-installed `package-name` to `node_modules/` of 301cb0ef41Sopenharmony_cithe current folder. 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ciNote that `package-name` is taken from `package.json`, _not_ from the 331cb0ef41Sopenharmony_cidirectory name. 341cb0ef41Sopenharmony_ci 351cb0ef41Sopenharmony_ciThe package name can be optionally prefixed with a scope. See 361cb0ef41Sopenharmony_ci[`scope`](/using-npm/scope). The scope must be preceded by an @-symbol and 371cb0ef41Sopenharmony_cifollowed by a slash. 381cb0ef41Sopenharmony_ci 391cb0ef41Sopenharmony_ciWhen creating tarballs for `npm publish`, the linked packages are 401cb0ef41Sopenharmony_ci"snapshotted" to their current state by resolving the symbolic links, if 411cb0ef41Sopenharmony_cithey are included in `bundleDependencies`. 421cb0ef41Sopenharmony_ci 431cb0ef41Sopenharmony_ciFor example: 441cb0ef41Sopenharmony_ci 451cb0ef41Sopenharmony_ci```bash 461cb0ef41Sopenharmony_cicd ~/projects/node-redis # go into the package directory 471cb0ef41Sopenharmony_cinpm link # creates global link 481cb0ef41Sopenharmony_cicd ~/projects/node-bloggy # go into some other package directory. 491cb0ef41Sopenharmony_cinpm link redis # link-install the package 501cb0ef41Sopenharmony_ci``` 511cb0ef41Sopenharmony_ci 521cb0ef41Sopenharmony_ciNow, any changes to `~/projects/node-redis` will be reflected in 531cb0ef41Sopenharmony_ci`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link 541cb0ef41Sopenharmony_cishould be to the package name, not the directory name for that package. 551cb0ef41Sopenharmony_ci 561cb0ef41Sopenharmony_ciYou may also shortcut the two steps in one. For example, to do the 571cb0ef41Sopenharmony_ciabove use-case in a shorter way: 581cb0ef41Sopenharmony_ci 591cb0ef41Sopenharmony_ci```bash 601cb0ef41Sopenharmony_cicd ~/projects/node-bloggy # go into the dir of your main project 611cb0ef41Sopenharmony_cinpm link ../node-redis # link the dir of your dependency 621cb0ef41Sopenharmony_ci``` 631cb0ef41Sopenharmony_ci 641cb0ef41Sopenharmony_ciThe second line is the equivalent of doing: 651cb0ef41Sopenharmony_ci 661cb0ef41Sopenharmony_ci```bash 671cb0ef41Sopenharmony_ci(cd ../node-redis; npm link) 681cb0ef41Sopenharmony_cinpm link redis 691cb0ef41Sopenharmony_ci``` 701cb0ef41Sopenharmony_ci 711cb0ef41Sopenharmony_ciThat is, it first creates a global link, and then links the global 721cb0ef41Sopenharmony_ciinstallation target into your project's `node_modules` folder. 731cb0ef41Sopenharmony_ci 741cb0ef41Sopenharmony_ciNote that in this case, you are referring to the directory name, 751cb0ef41Sopenharmony_ci`node-redis`, rather than the package name `redis`. 761cb0ef41Sopenharmony_ci 771cb0ef41Sopenharmony_ciIf your linked package is scoped (see [`scope`](/using-npm/scope)) your 781cb0ef41Sopenharmony_cilink command must include that scope, e.g. 791cb0ef41Sopenharmony_ci 801cb0ef41Sopenharmony_ci```bash 811cb0ef41Sopenharmony_cinpm link @myorg/privatepackage 821cb0ef41Sopenharmony_ci``` 831cb0ef41Sopenharmony_ci 841cb0ef41Sopenharmony_ci### Caveat 851cb0ef41Sopenharmony_ci 861cb0ef41Sopenharmony_ciNote that package dependencies linked in this way are _not_ saved to 871cb0ef41Sopenharmony_ci`package.json` by default, on the assumption that the intention is to have 881cb0ef41Sopenharmony_cia link stand in for a regular non-link dependency. Otherwise, for example, 891cb0ef41Sopenharmony_ciif you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace 901cb0ef41Sopenharmony_cithe `^3.0.1` dependency with `file:../path/to/node-redis`, which you 911cb0ef41Sopenharmony_ciprobably don't want! Additionally, other users or developers on your 921cb0ef41Sopenharmony_ciproject would run into issues if they do not have their folders set up 931cb0ef41Sopenharmony_ciexactly the same as yours. 941cb0ef41Sopenharmony_ci 951cb0ef41Sopenharmony_ciIf you are adding a _new_ dependency as a link, you should add it to the 961cb0ef41Sopenharmony_cirelevant metadata by running `npm install <dep> --package-lock-only`. 971cb0ef41Sopenharmony_ci 981cb0ef41Sopenharmony_ciIf you _want_ to save the `file:` reference in your `package.json` and 991cb0ef41Sopenharmony_ci`package-lock.json` files, you can use `npm link <dep> --save` to do so. 1001cb0ef41Sopenharmony_ci 1011cb0ef41Sopenharmony_ci### Workspace Usage 1021cb0ef41Sopenharmony_ci 1031cb0ef41Sopenharmony_ci`npm link <pkg> --workspace <name>` will link the relevant package as a 1041cb0ef41Sopenharmony_cidependency of the specified workspace(s). Note that It may actually be 1051cb0ef41Sopenharmony_cilinked into the parent project's `node_modules` folder, if there are no 1061cb0ef41Sopenharmony_ciconflicting dependencies. 1071cb0ef41Sopenharmony_ci 1081cb0ef41Sopenharmony_ci`npm link --workspace <name>` will create a global link to the specified 1091cb0ef41Sopenharmony_ciworkspace(s). 1101cb0ef41Sopenharmony_ci 1111cb0ef41Sopenharmony_ci### Configuration 1121cb0ef41Sopenharmony_ci 1131cb0ef41Sopenharmony_ci#### `save` 1141cb0ef41Sopenharmony_ci 1151cb0ef41Sopenharmony_ci* Default: `true` unless when using `npm update` where it defaults to `false` 1161cb0ef41Sopenharmony_ci* Type: Boolean 1171cb0ef41Sopenharmony_ci 1181cb0ef41Sopenharmony_ciSave installed packages to a `package.json` file as dependencies. 1191cb0ef41Sopenharmony_ci 1201cb0ef41Sopenharmony_ciWhen used with the `npm rm` command, removes the dependency from 1211cb0ef41Sopenharmony_ci`package.json`. 1221cb0ef41Sopenharmony_ci 1231cb0ef41Sopenharmony_ciWill also prevent writing to `package-lock.json` if set to `false`. 1241cb0ef41Sopenharmony_ci 1251cb0ef41Sopenharmony_ci 1261cb0ef41Sopenharmony_ci 1271cb0ef41Sopenharmony_ci#### `save-exact` 1281cb0ef41Sopenharmony_ci 1291cb0ef41Sopenharmony_ci* Default: false 1301cb0ef41Sopenharmony_ci* Type: Boolean 1311cb0ef41Sopenharmony_ci 1321cb0ef41Sopenharmony_ciDependencies saved to package.json will be configured with an exact version 1331cb0ef41Sopenharmony_cirather than using npm's default semver range operator. 1341cb0ef41Sopenharmony_ci 1351cb0ef41Sopenharmony_ci 1361cb0ef41Sopenharmony_ci 1371cb0ef41Sopenharmony_ci#### `global` 1381cb0ef41Sopenharmony_ci 1391cb0ef41Sopenharmony_ci* Default: false 1401cb0ef41Sopenharmony_ci* Type: Boolean 1411cb0ef41Sopenharmony_ci 1421cb0ef41Sopenharmony_ciOperates in "global" mode, so that packages are installed into the `prefix` 1431cb0ef41Sopenharmony_cifolder instead of the current working directory. See 1441cb0ef41Sopenharmony_ci[folders](/configuring-npm/folders) for more on the differences in behavior. 1451cb0ef41Sopenharmony_ci 1461cb0ef41Sopenharmony_ci* packages are installed into the `{prefix}/lib/node_modules` folder, instead 1471cb0ef41Sopenharmony_ci of the current working directory. 1481cb0ef41Sopenharmony_ci* bin files are linked to `{prefix}/bin` 1491cb0ef41Sopenharmony_ci* man pages are linked to `{prefix}/share/man` 1501cb0ef41Sopenharmony_ci 1511cb0ef41Sopenharmony_ci 1521cb0ef41Sopenharmony_ci 1531cb0ef41Sopenharmony_ci#### `install-strategy` 1541cb0ef41Sopenharmony_ci 1551cb0ef41Sopenharmony_ci* Default: "hoisted" 1561cb0ef41Sopenharmony_ci* Type: "hoisted", "nested", "shallow", or "linked" 1571cb0ef41Sopenharmony_ci 1581cb0ef41Sopenharmony_ciSets the strategy for installing packages in node_modules. hoisted 1591cb0ef41Sopenharmony_ci(default): Install non-duplicated in top-level, and duplicated as necessary 1601cb0ef41Sopenharmony_ciwithin directory structure. nested: (formerly --legacy-bundling) install in 1611cb0ef41Sopenharmony_ciplace, no hoisting. shallow (formerly --global-style) only install direct 1621cb0ef41Sopenharmony_cideps at top-level. linked: (experimental) install in node_modules/.store, 1631cb0ef41Sopenharmony_cilink in place, unhoisted. 1641cb0ef41Sopenharmony_ci 1651cb0ef41Sopenharmony_ci 1661cb0ef41Sopenharmony_ci 1671cb0ef41Sopenharmony_ci#### `legacy-bundling` 1681cb0ef41Sopenharmony_ci 1691cb0ef41Sopenharmony_ci* Default: false 1701cb0ef41Sopenharmony_ci* Type: Boolean 1711cb0ef41Sopenharmony_ci* DEPRECATED: This option has been deprecated in favor of 1721cb0ef41Sopenharmony_ci `--install-strategy=nested` 1731cb0ef41Sopenharmony_ci 1741cb0ef41Sopenharmony_ciInstead of hoisting package installs in `node_modules`, install packages in 1751cb0ef41Sopenharmony_cithe same manner that they are depended on. This may cause very deep 1761cb0ef41Sopenharmony_cidirectory structures and duplicate package installs as there is no 1771cb0ef41Sopenharmony_cide-duplicating. Sets `--install-strategy=nested`. 1781cb0ef41Sopenharmony_ci 1791cb0ef41Sopenharmony_ci 1801cb0ef41Sopenharmony_ci 1811cb0ef41Sopenharmony_ci#### `global-style` 1821cb0ef41Sopenharmony_ci 1831cb0ef41Sopenharmony_ci* Default: false 1841cb0ef41Sopenharmony_ci* Type: Boolean 1851cb0ef41Sopenharmony_ci* DEPRECATED: This option has been deprecated in favor of 1861cb0ef41Sopenharmony_ci `--install-strategy=shallow` 1871cb0ef41Sopenharmony_ci 1881cb0ef41Sopenharmony_ciOnly install direct dependencies in the top level `node_modules`, but hoist 1891cb0ef41Sopenharmony_cion deeper dependencies. Sets `--install-strategy=shallow`. 1901cb0ef41Sopenharmony_ci 1911cb0ef41Sopenharmony_ci 1921cb0ef41Sopenharmony_ci 1931cb0ef41Sopenharmony_ci#### `strict-peer-deps` 1941cb0ef41Sopenharmony_ci 1951cb0ef41Sopenharmony_ci* Default: false 1961cb0ef41Sopenharmony_ci* Type: Boolean 1971cb0ef41Sopenharmony_ci 1981cb0ef41Sopenharmony_ciIf set to `true`, and `--legacy-peer-deps` is not set, then _any_ 1991cb0ef41Sopenharmony_ciconflicting `peerDependencies` will be treated as an install failure, even 2001cb0ef41Sopenharmony_ciif npm could reasonably guess the appropriate resolution based on non-peer 2011cb0ef41Sopenharmony_cidependency relationships. 2021cb0ef41Sopenharmony_ci 2031cb0ef41Sopenharmony_ciBy default, conflicting `peerDependencies` deep in the dependency graph will 2041cb0ef41Sopenharmony_cibe resolved using the nearest non-peer dependency specification, even if 2051cb0ef41Sopenharmony_cidoing so will result in some packages receiving a peer dependency outside 2061cb0ef41Sopenharmony_cithe range set in their package's `peerDependencies` object. 2071cb0ef41Sopenharmony_ci 2081cb0ef41Sopenharmony_ciWhen such an override is performed, a warning is printed, explaining the 2091cb0ef41Sopenharmony_ciconflict and the packages involved. If `--strict-peer-deps` is set, then 2101cb0ef41Sopenharmony_cithis warning is treated as a failure. 2111cb0ef41Sopenharmony_ci 2121cb0ef41Sopenharmony_ci 2131cb0ef41Sopenharmony_ci 2141cb0ef41Sopenharmony_ci#### `package-lock` 2151cb0ef41Sopenharmony_ci 2161cb0ef41Sopenharmony_ci* Default: true 2171cb0ef41Sopenharmony_ci* Type: Boolean 2181cb0ef41Sopenharmony_ci 2191cb0ef41Sopenharmony_ciIf set to false, then ignore `package-lock.json` files when installing. This 2201cb0ef41Sopenharmony_ciwill also prevent _writing_ `package-lock.json` if `save` is true. 2211cb0ef41Sopenharmony_ci 2221cb0ef41Sopenharmony_ci 2231cb0ef41Sopenharmony_ci 2241cb0ef41Sopenharmony_ci#### `omit` 2251cb0ef41Sopenharmony_ci 2261cb0ef41Sopenharmony_ci* Default: 'dev' if the `NODE_ENV` environment variable is set to 2271cb0ef41Sopenharmony_ci 'production', otherwise empty. 2281cb0ef41Sopenharmony_ci* Type: "dev", "optional", or "peer" (can be set multiple times) 2291cb0ef41Sopenharmony_ci 2301cb0ef41Sopenharmony_ciDependency types to omit from the installation tree on disk. 2311cb0ef41Sopenharmony_ci 2321cb0ef41Sopenharmony_ciNote that these dependencies _are_ still resolved and added to the 2331cb0ef41Sopenharmony_ci`package-lock.json` or `npm-shrinkwrap.json` file. They are just not 2341cb0ef41Sopenharmony_ciphysically installed on disk. 2351cb0ef41Sopenharmony_ci 2361cb0ef41Sopenharmony_ciIf a package type appears in both the `--include` and `--omit` lists, then 2371cb0ef41Sopenharmony_ciit will be included. 2381cb0ef41Sopenharmony_ci 2391cb0ef41Sopenharmony_ciIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment 2401cb0ef41Sopenharmony_civariable will be set to `'production'` for all lifecycle scripts. 2411cb0ef41Sopenharmony_ci 2421cb0ef41Sopenharmony_ci 2431cb0ef41Sopenharmony_ci 2441cb0ef41Sopenharmony_ci#### `include` 2451cb0ef41Sopenharmony_ci 2461cb0ef41Sopenharmony_ci* Default: 2471cb0ef41Sopenharmony_ci* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) 2481cb0ef41Sopenharmony_ci 2491cb0ef41Sopenharmony_ciOption that allows for defining which types of dependencies to install. 2501cb0ef41Sopenharmony_ci 2511cb0ef41Sopenharmony_ciThis is the inverse of `--omit=<type>`. 2521cb0ef41Sopenharmony_ci 2531cb0ef41Sopenharmony_ciDependency types specified in `--include` will not be omitted, regardless of 2541cb0ef41Sopenharmony_cithe order in which omit/include are specified on the command-line. 2551cb0ef41Sopenharmony_ci 2561cb0ef41Sopenharmony_ci 2571cb0ef41Sopenharmony_ci 2581cb0ef41Sopenharmony_ci#### `ignore-scripts` 2591cb0ef41Sopenharmony_ci 2601cb0ef41Sopenharmony_ci* Default: false 2611cb0ef41Sopenharmony_ci* Type: Boolean 2621cb0ef41Sopenharmony_ci 2631cb0ef41Sopenharmony_ciIf true, npm does not run scripts specified in package.json files. 2641cb0ef41Sopenharmony_ci 2651cb0ef41Sopenharmony_ciNote that commands explicitly intended to run a particular script, such as 2661cb0ef41Sopenharmony_ci`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` 2671cb0ef41Sopenharmony_ciwill still run their intended script if `ignore-scripts` is set, but they 2681cb0ef41Sopenharmony_ciwill *not* run any pre- or post-scripts. 2691cb0ef41Sopenharmony_ci 2701cb0ef41Sopenharmony_ci 2711cb0ef41Sopenharmony_ci 2721cb0ef41Sopenharmony_ci#### `audit` 2731cb0ef41Sopenharmony_ci 2741cb0ef41Sopenharmony_ci* Default: true 2751cb0ef41Sopenharmony_ci* Type: Boolean 2761cb0ef41Sopenharmony_ci 2771cb0ef41Sopenharmony_ciWhen "true" submit audit reports alongside the current npm command to the 2781cb0ef41Sopenharmony_cidefault registry and all registries configured for scopes. See the 2791cb0ef41Sopenharmony_cidocumentation for [`npm audit`](/commands/npm-audit) for details on what is 2801cb0ef41Sopenharmony_cisubmitted. 2811cb0ef41Sopenharmony_ci 2821cb0ef41Sopenharmony_ci 2831cb0ef41Sopenharmony_ci 2841cb0ef41Sopenharmony_ci#### `bin-links` 2851cb0ef41Sopenharmony_ci 2861cb0ef41Sopenharmony_ci* Default: true 2871cb0ef41Sopenharmony_ci* Type: Boolean 2881cb0ef41Sopenharmony_ci 2891cb0ef41Sopenharmony_ciTells npm to create symlinks (or `.cmd` shims on Windows) for package 2901cb0ef41Sopenharmony_ciexecutables. 2911cb0ef41Sopenharmony_ci 2921cb0ef41Sopenharmony_ciSet to false to have it not do this. This can be used to work around the 2931cb0ef41Sopenharmony_cifact that some file systems don't support symlinks, even on ostensibly Unix 2941cb0ef41Sopenharmony_cisystems. 2951cb0ef41Sopenharmony_ci 2961cb0ef41Sopenharmony_ci 2971cb0ef41Sopenharmony_ci 2981cb0ef41Sopenharmony_ci#### `fund` 2991cb0ef41Sopenharmony_ci 3001cb0ef41Sopenharmony_ci* Default: true 3011cb0ef41Sopenharmony_ci* Type: Boolean 3021cb0ef41Sopenharmony_ci 3031cb0ef41Sopenharmony_ciWhen "true" displays the message at the end of each `npm install` 3041cb0ef41Sopenharmony_ciacknowledging the number of dependencies looking for funding. See [`npm 3051cb0ef41Sopenharmony_cifund`](/commands/npm-fund) for details. 3061cb0ef41Sopenharmony_ci 3071cb0ef41Sopenharmony_ci 3081cb0ef41Sopenharmony_ci 3091cb0ef41Sopenharmony_ci#### `dry-run` 3101cb0ef41Sopenharmony_ci 3111cb0ef41Sopenharmony_ci* Default: false 3121cb0ef41Sopenharmony_ci* Type: Boolean 3131cb0ef41Sopenharmony_ci 3141cb0ef41Sopenharmony_ciIndicates that you don't want npm to make any changes and that it should 3151cb0ef41Sopenharmony_cionly report what it would have done. This can be passed into any of the 3161cb0ef41Sopenharmony_cicommands that modify your local installation, eg, `install`, `update`, 3171cb0ef41Sopenharmony_ci`dedupe`, `uninstall`, as well as `pack` and `publish`. 3181cb0ef41Sopenharmony_ci 3191cb0ef41Sopenharmony_ciNote: This is NOT honored by other network related commands, eg `dist-tags`, 3201cb0ef41Sopenharmony_ci`owner`, etc. 3211cb0ef41Sopenharmony_ci 3221cb0ef41Sopenharmony_ci 3231cb0ef41Sopenharmony_ci 3241cb0ef41Sopenharmony_ci#### `workspace` 3251cb0ef41Sopenharmony_ci 3261cb0ef41Sopenharmony_ci* Default: 3271cb0ef41Sopenharmony_ci* Type: String (can be set multiple times) 3281cb0ef41Sopenharmony_ci 3291cb0ef41Sopenharmony_ciEnable running a command in the context of the configured workspaces of the 3301cb0ef41Sopenharmony_cicurrent project while filtering by running only the workspaces defined by 3311cb0ef41Sopenharmony_cithis configuration option. 3321cb0ef41Sopenharmony_ci 3331cb0ef41Sopenharmony_ciValid values for the `workspace` config are either: 3341cb0ef41Sopenharmony_ci 3351cb0ef41Sopenharmony_ci* Workspace names 3361cb0ef41Sopenharmony_ci* Path to a workspace directory 3371cb0ef41Sopenharmony_ci* Path to a parent workspace directory (will result in selecting all 3381cb0ef41Sopenharmony_ci workspaces within that folder) 3391cb0ef41Sopenharmony_ci 3401cb0ef41Sopenharmony_ciWhen set for the `npm init` command, this may be set to the folder of a 3411cb0ef41Sopenharmony_ciworkspace which does not yet exist, to create the folder and set it up as a 3421cb0ef41Sopenharmony_cibrand new workspace within the project. 3431cb0ef41Sopenharmony_ci 3441cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 3451cb0ef41Sopenharmony_ci 3461cb0ef41Sopenharmony_ci#### `workspaces` 3471cb0ef41Sopenharmony_ci 3481cb0ef41Sopenharmony_ci* Default: null 3491cb0ef41Sopenharmony_ci* Type: null or Boolean 3501cb0ef41Sopenharmony_ci 3511cb0ef41Sopenharmony_ciSet to true to run the command in the context of **all** configured 3521cb0ef41Sopenharmony_ciworkspaces. 3531cb0ef41Sopenharmony_ci 3541cb0ef41Sopenharmony_ciExplicitly setting this to false will cause commands like `install` to 3551cb0ef41Sopenharmony_ciignore workspaces altogether. When not set explicitly: 3561cb0ef41Sopenharmony_ci 3571cb0ef41Sopenharmony_ci- Commands that operate on the `node_modules` tree (install, update, etc.) 3581cb0ef41Sopenharmony_ciwill link workspaces into the `node_modules` folder. - Commands that do 3591cb0ef41Sopenharmony_ciother things (test, exec, publish, etc.) will operate on the root project, 3601cb0ef41Sopenharmony_ci_unless_ one or more workspaces are specified in the `workspace` config. 3611cb0ef41Sopenharmony_ci 3621cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 3631cb0ef41Sopenharmony_ci 3641cb0ef41Sopenharmony_ci#### `include-workspace-root` 3651cb0ef41Sopenharmony_ci 3661cb0ef41Sopenharmony_ci* Default: false 3671cb0ef41Sopenharmony_ci* Type: Boolean 3681cb0ef41Sopenharmony_ci 3691cb0ef41Sopenharmony_ciInclude the workspace root when workspaces are enabled for a command. 3701cb0ef41Sopenharmony_ci 3711cb0ef41Sopenharmony_ciWhen false, specifying individual workspaces via the `workspace` config, or 3721cb0ef41Sopenharmony_ciall workspaces via the `workspaces` flag, will cause npm to operate only on 3731cb0ef41Sopenharmony_cithe specified workspaces, and not on the root project. 3741cb0ef41Sopenharmony_ci 3751cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 3761cb0ef41Sopenharmony_ci 3771cb0ef41Sopenharmony_ci#### `install-links` 3781cb0ef41Sopenharmony_ci 3791cb0ef41Sopenharmony_ci* Default: false 3801cb0ef41Sopenharmony_ci* Type: Boolean 3811cb0ef41Sopenharmony_ci 3821cb0ef41Sopenharmony_ciWhen set file: protocol dependencies will be packed and installed as regular 3831cb0ef41Sopenharmony_cidependencies instead of creating a symlink. This option has no effect on 3841cb0ef41Sopenharmony_ciworkspaces. 3851cb0ef41Sopenharmony_ci 3861cb0ef41Sopenharmony_ci 3871cb0ef41Sopenharmony_ci 3881cb0ef41Sopenharmony_ci### See Also 3891cb0ef41Sopenharmony_ci 3901cb0ef41Sopenharmony_ci* [package spec](/using-npm/package-spec) 3911cb0ef41Sopenharmony_ci* [npm developers](/using-npm/developers) 3921cb0ef41Sopenharmony_ci* [package.json](/configuring-npm/package-json) 3931cb0ef41Sopenharmony_ci* [npm install](/commands/npm-install) 3941cb0ef41Sopenharmony_ci* [npm folders](/configuring-npm/folders) 3951cb0ef41Sopenharmony_ci* [npm config](/commands/npm-config) 3961cb0ef41Sopenharmony_ci* [npmrc](/configuring-npm/npmrc) 397