A scratch container doesn't even have busybox in it, does it? If not, this wouldn't be able to run npm, much less install anything which has bindings to other libraries.
Definitely a cute experiment, but probably of limited real-world use. I wonder what the smallest _practical_ node container would look like?