So true. In fact, this is one of the main reasons (in my opinion) that Node.js has seen such explosive growth. A package manager makes sharing code, keeping it updated, etc., so much easier.
In fact, it would probably be pretty simple just to create a little "packager" tool that packages the code into a special homebrew formula.
After all, this is what homebrew is for. Why reinvent the wheel?