The Heroku node buildpack now tracks the version of node used by your app. On each build, the node version is checked against the version in the previous build. If the version has changed,
npm rebuild is run automatically to recompile any binary dependencies used by your app. This ensures that the app’s dependencies are compatible with the installed node version.
For more details about node build behavior, see the Heroku Node.js Support article.