Is it feasible to sell e.g. a large Node.js codebase which allows buyers to modify and distribute their own versions of the compiled software while restricting the public release of the source code?
As with anything - it depends. Are the libraries AGPL/SSPL? Then probably not. Anything that triggers a distribution invokes the requirements of the underlying licenses.