
What both methods have in common is that they are setting the correct environment for using npm inside Homebrew and are returning the arguments for invoking npm install for their specific use cases. need to also compile non-JavaScript sources) which have to use local_npm_install_args (like emscripten or grunt-cli) formulae where the npm install call is not the only required install step (e.g.formulae for standard Node modules compatible with npm’s global module format which should use std_npm_install_args (like apollo-cli or webpack).In the following we distinguish between two types of Node modules installed using formulae: This prevents the Node modules from contaminating the global node_modules, which is important so that npm doesn’t try to manage Homebrew-installed Node modules. Node modules should be installed to libexec.

To make sure we don’t overlook your formula on a Node major version bump, write a meaningful test which would fail in such a case (being invoked with an ABI-incompatible Node version). This means that we need to revision every formula with a Node native addon with every major version bump of the node formula. Also note that such a formula would only be compatible with the same Node major version it originally was compiled with.
