2019-11-05 14:55:08 -05:00
|
|
|
---
|
|
|
|
title: npm-rebuild
|
2020-11-01 07:54:36 +01:00
|
|
|
section: 1
|
2019-11-05 14:55:08 -05:00
|
|
|
description: Rebuild a package
|
|
|
|
---
|
|
|
|
|
|
|
|
### Synopsis
|
|
|
|
|
|
|
|
```bash
|
2020-12-11 18:54:56 -05:00
|
|
|
npm rebuild [[<@scope>/]<name>[@<version>] ...]
|
2019-11-05 14:55:08 -05:00
|
|
|
|
2020-12-11 18:54:56 -05:00
|
|
|
alias: rb
|
2019-11-05 14:55:08 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
### Description
|
|
|
|
|
2020-12-11 18:54:56 -05:00
|
|
|
This command runs the `npm build` command on the matched folders. This is
|
|
|
|
useful when you install a new version of node, and must recompile all your
|
|
|
|
C++ addons with the new binary. It is also useful when installing with
|
|
|
|
`--ignore-scripts` and `--no-bin-links`, to explicitly choose which
|
|
|
|
packages to build and/or link bins.
|
|
|
|
|
|
|
|
If one or more package names (and optionally version ranges) are provided,
|
|
|
|
then only packages with a name and version matching one of the specifiers
|
|
|
|
will be rebuilt.
|
2019-11-05 14:55:08 -05:00
|
|
|
|
|
|
|
### See Also
|
|
|
|
|
2020-11-01 07:54:36 +01:00
|
|
|
* [npm install](/commands/npm-install)
|