Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-set.md59 linesDownload Raw Back to commands
1---
2title: npm-set
3section: 1
4description: Set a value in the npm configuration
5---
6
7### Synopsis
8
9```bash
10npm set <key>=<value> [<key>=<value> ...] (See `npm config`)
11```
12
13Note: This command is unaware of workspaces.
14
15### Description
16
17Set a value in the npm configuration
18
19### Configuration
20
21#### `global`
22
23* Default: false
24* Type: Boolean
25
26Operates in "global" mode, so that packages are installed into the `prefix`
27folder instead of the current working directory. See
28[folders](/configuring-npm/folders) for more on the differences in behavior.
29
30* packages are installed into the `{prefix}/lib/node_modules` folder, instead
31  of the current working directory.
32* bin files are linked to `{prefix}/bin`
33* man pages are linked to `{prefix}/share/man`
34
35
36
37#### `location`
38
39* Default: "user" unless `--global` is passed, which will also set this value
40  to "global"
41* Type: "global", "user", or "project"
42
43When passed to `npm config` this refers to which config file to use.
44
45When set to "global" mode, packages are installed into the `prefix` folder
46instead of the current working directory. See
47[folders](/configuring-npm/folders) for more on the differences in behavior.
48
49* packages are installed into the `{prefix}/lib/node_modules` folder, instead
50  of the current working directory.
51* bin files are linked to `{prefix}/bin`
52* man pages are linked to `{prefix}/share/man`
53
54
55
56### See Also
57
58* [npm help config](/commands/npm-config)
59 
codekingpro/portable-devtools · Team Ai