npm-rebuild.1 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. .TH "NPM\-REBUILD" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-rebuild\fR \- Rebuild a package
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm rebuild [[<@scope>/]<name>[@<version>] \.\.\.]
  9. alias: rb
  10. .fi
  11. .RE
  12. .SS Description
  13. .P
  14. This command runs the \fBnpm build\fP command on the matched folders\. This is
  15. useful when you install a new version of node, and must recompile all your
  16. C++ addons with the new binary\. It is also useful when installing with
  17. \fB\-\-ignore\-scripts\fP and \fB\-\-no\-bin\-links\fP, to explicitly choose which
  18. packages to build and/or link bins\.
  19. .P
  20. If one or more package names (and optionally version ranges) are provided,
  21. then only packages with a name and version matching one of the specifiers
  22. will be rebuilt\.
  23. .SS Configuration
  24. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  25. <!\-\- automatically generated, do not edit manually \-\->
  26. <!\-\- see lib/utils/config/definitions\.js \-\->
  27. .SS \fBglobal\fP
  28. .RS 0
  29. .IP \(bu 2
  30. Default: false
  31. .IP \(bu 2
  32. Type: Boolean
  33. .RE
  34. .P
  35. Operates in "global" mode, so that packages are installed into the \fBprefix\fP
  36. folder instead of the current working directory\. See
  37. npm help folders for more on the differences in behavior\.
  38. .RS 0
  39. .IP \(bu 2
  40. packages are installed into the \fB{prefix}/lib/node_modules\fP folder, instead
  41. of the current working directory\.
  42. .IP \(bu 2
  43. bin files are linked to \fB{prefix}/bin\fP
  44. .IP \(bu 2
  45. man pages are linked to \fB{prefix}/share/man\fP
  46. .RE
  47. <!\-\- automatically generated, do not edit manually \-\->
  48. <!\-\- see lib/utils/config/definitions\.js \-\->
  49. .SS \fBbin\-links\fP
  50. .RS 0
  51. .IP \(bu 2
  52. Default: true
  53. .IP \(bu 2
  54. Type: Boolean
  55. .RE
  56. .P
  57. Tells npm to create symlinks (or \fB\|\.cmd\fP shims on Windows) for package
  58. executables\.
  59. .P
  60. Set to false to have it not do this\. This can be used to work around the
  61. fact that some file systems don't support symlinks, even on ostensibly Unix
  62. systems\.
  63. <!\-\- automatically generated, do not edit manually \-\->
  64. <!\-\- see lib/utils/config/definitions\.js \-\->
  65. .SS \fBignore\-scripts\fP
  66. .RS 0
  67. .IP \(bu 2
  68. Default: false
  69. .IP \(bu 2
  70. Type: Boolean
  71. .RE
  72. .P
  73. If true, npm does not run scripts specified in package\.json files\.
  74. .P
  75. Note that commands explicitly intended to run a particular script, such as
  76. \fBnpm start\fP, \fBnpm stop\fP, \fBnpm restart\fP, \fBnpm test\fP, and \fBnpm run\-script\fP
  77. will still run their intended script if \fBignore\-scripts\fP is set, but they
  78. will \fInot\fR run any pre\- or post\-scripts\.
  79. <!\-\- automatically generated, do not edit manually \-\->
  80. <!\-\- see lib/utils/config/definitions\.js \-\->
  81. .SS \fBworkspace\fP
  82. .RS 0
  83. .IP \(bu 2
  84. Default:
  85. .IP \(bu 2
  86. Type: String (can be set multiple times)
  87. .RE
  88. .P
  89. Enable running a command in the context of the configured workspaces of the
  90. current project while filtering by running only the workspaces defined by
  91. this configuration option\.
  92. .P
  93. Valid values for the \fBworkspace\fP config are either:
  94. .RS 0
  95. .IP \(bu 2
  96. Workspace names
  97. .IP \(bu 2
  98. Path to a workspace directory
  99. .IP \(bu 2
  100. Path to a parent workspace directory (will result in selecting all
  101. workspaces within that folder)
  102. .RE
  103. .P
  104. When set for the \fBnpm init\fP command, this may be set to the folder of a
  105. workspace which does not yet exist, to create the folder and set it up as a
  106. brand new workspace within the project\.
  107. .P
  108. This value is not exported to the environment for child processes\.
  109. <!\-\- automatically generated, do not edit manually \-\->
  110. <!\-\- see lib/utils/config/definitions\.js \-\->
  111. .SS \fBworkspaces\fP
  112. .RS 0
  113. .IP \(bu 2
  114. Default: null
  115. .IP \(bu 2
  116. Type: null or Boolean
  117. .RE
  118. .P
  119. Set to true to run the command in the context of \fBall\fR configured
  120. workspaces\.
  121. .P
  122. Explicitly setting this to false will cause commands like \fBinstall\fP to
  123. ignore workspaces altogether\. When not set explicitly:
  124. .RS 0
  125. .IP \(bu 2
  126. Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
  127. will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
  128. other things (test, exec, publish, etc\.) will operate on the root project,
  129. \fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
  130. .RE
  131. .P
  132. This value is not exported to the environment for child processes\.
  133. <!\-\- automatically generated, do not edit manually \-\->
  134. <!\-\- see lib/utils/config/definitions\.js \-\->
  135. .SS \fBinclude\-workspace\-root\fP
  136. .RS 0
  137. .IP \(bu 2
  138. Default: false
  139. .IP \(bu 2
  140. Type: Boolean
  141. .RE
  142. .P
  143. Include the workspace root when workspaces are enabled for a command\.
  144. .P
  145. When false, specifying individual workspaces via the \fBworkspace\fP config, or
  146. all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
  147. the specified workspaces, and not on the root project\.
  148. <!\-\- automatically generated, do not edit manually \-\->
  149. <!\-\- see lib/utils/config/definitions\.js \-\->
  150. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  151. .SS See Also
  152. .RS 0
  153. .IP \(bu 2
  154. npm help install
  155. .RE