<!doctype html><html><title>npm-rebuild</title><metahttp-equiv="content-type"value="text/html;utf-8"><linkrel="stylesheet"type="text/css"href="../../static/style.css"><linkrel="canonical"href="https://www.npmjs.org/doc/api/npm-rebuild.html"><script async=truesrc="../../static/toc.js"></script><body><divid="wrapper"><h1><ahref="../api/npm-rebuild.html">npm-rebuild</a></h1><p>Rebuild a package</p><h2id="synopsis">SYNOPSIS</h2><pre><code>npm.commands.rebuild([packages,] callback)</code></pre><h2id="description">DESCRIPTION</h2><p>This command runs the <code>npm build</code> command on each of the matched packages. This is usefulwhen you install a new version of node, and must recompile all your C++ addons withthe new binary. If no 'packages' parameter is specify, every package will be rebuilt.</p><h2id="configuration">CONFIGURATION</h2><p>See <code>npm help build</code></p></div><tableborder=0cellspacing=0cellpadding=0id=npmlogo><tr><tdstyle="width:180px;height:10px;background:rgb(237,127,127)"colspan=18> </td></tr><tr><tdrowspan=4style="width:10px;height:10px;background:rgb(237,127,127)"> </td><tdstyle="width:40px;height:10px;background:#fff"colspan=4> </td><tdstyle="width:10px;height:10px;background:rgb(237,127,127)"rowspan=4> </td><tdstyle="width:40px;height:10px;background:#fff"colspan=4> </td><tdrowspan=4style="width:10px;height:10px;background:rgb(237,127,127)"> </td><tdcolspan=6style="width:60px;height:10px;background:#fff"> </td><tdstyle="width:10px;height:10px;background:rgb(237,127,127)"rowspan=4> </td></tr><tr><tdcolspan=2style="width:20px;height:30px;background:#fff"rowspan=3> </td><tdstyle="width:10px;height:10px;background:rgb(237,127,127)"rowspan=3> </td><tdstyle="width:10px;height:10px;background:#fff"rowspan=3> </td><tdstyle="width:20px;height:10px;background:#fff"rowspan=4colspan=2> </td><tdstyle="width:10px;height:20px;background:rgb(237,127,127)"rowspan=2> </td><tdstyle="width:10px;height:10px;background:#fff"rowspan=3> </td><tdstyle="width:20px;height:10px;background:#fff"rowspan=3colspan=2> </td><tdstyle="width:10px;height:10px;background:rgb(237,127,127)"rowspan=3> </td><tdstyle="width:10px;height:10px;background:#fff"rowspan=3> </td><tdstyle="width:10px;height:10px;background:rgb(237,127,127)"rowspan=3> </td></tr><tr><tdstyle="width:10px;height:10px;background:#fff"rowspan=2> </td></tr><tr><tdstyle="width:10px;height:10px;background:#fff"> </td></tr><tr><tdstyle="width:60px;height:10px;background:rgb(237,127,127)"colspan=6> </td><tdcolspan=10style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr><tr><tdcolspan=5style="width:50px;height:10px;background:#fff"> </td><tdstyle="width:40px;height:10px;background:rgb(237,127,127)"colspan=4> </td><tdstyle="width:90px;height:10px;background:#fff"colspan=9> </td></tr></table><pid="footer">npm-rebuild — npm@2.1.3</p>