Linux command
npm-rb 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Rebuild all packages
npm rb
Rebuild specific package
npm rb [package-name]
Rebuild global packages
npm rb -g
Rebuild multiple specific packages
npm rb [package1] [package2]
说明
npm rb is an alias for npm rebuild. It recompiles native addon modules (C/C++ bindings) using node-gyp. Commonly needed after upgrading Node.js versions, as native addons are compiled against a specific Node.js ABI. Also useful after manually modifying a package's source code in node_modules.
参数
- -g
- Rebuild global packages.
- --help
- Display help information.
FAQ
What is the npm-rb command used for?
npm rb is an alias for npm rebuild. It recompiles native addon modules (C/C++ bindings) using node-gyp. Commonly needed after upgrading Node.js versions, as native addons are compiled against a specific Node.js ABI. Also useful after manually modifying a package's source code in node_modules.
How do I run a basic npm-rb example?
Run `npm rb` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -g do in npm-rb?
Rebuild global packages.