Maven and npm/vue concurrently?

I have a kotlin backend / vue frontend “full stack” app. Locally, I have maven run npm install, then npm run lint / test / build (which all use vue-cli-service) as part of the standard build lifecycle. When running on circle, however, the combination of the java & node processes quickly eat through the 4G available memory. I’ve tried limiting java memory via -XX:MaxRAM and node memory via --max-old-space-size and --max-semi-space-size but can’t seem to get a combination of params that actually fits with in the space I tell it to use. For now, I run the node build ahead of the maven build and have the maven build skip launching npm when run under CI, but would be great to have local & circle execution more in sync.

Anyone have luck with a similar setup?