2025-12-16 10:20:31 -07:00
|
|
|
# npm rebuild
|
|
|
|
|
|
|
|
|
|
> Rebuild native Node.js packages after Node or dependency changes.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://docs.npmjs.com/cli/npm-rebuild/>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Rebuild a specific package:
|
|
|
|
|
|
|
|
|
|
`npm {{[rb|rebuild]}} {{package}}`
|
|
|
|
|
|
|
|
|
|
- Rebuild all installed packages:
|
|
|
|
|
|
|
|
|
|
`npm {{[rb|rebuild]}}`
|
|
|
|
|
|
|
|
|
|
- Rebuild with verbose output:
|
|
|
|
|
|
|
|
|
|
`npm {{[rb|rebuild]}} --verbose`
|
|
|
|
|
|
|
|
|
|
- Rebuild a package in a specific directory:
|
|
|
|
|
|
|
|
|
|
`npm {{[rb|rebuild]}} --prefix {{path/to/dir}} {{package}}`
|
|
|
|
|
|
|
|
|
|
- Rebuild without using the npm cache:
|
|
|
|
|
|
|
|
|
|
`npm {{[rb|rebuild]}} --no-cache`
|
|
|
|
|
|
|
|
|
|
- Rebuild in global mode:
|
|
|
|
|
|
|
|
|
|
`npm {{[rb|rebuild]}} {{[-g|--global]}}`
|