This should speed up my installation step.
Luckily pnpm is pretty much a drop in replacement for npm so most commands can just be replaced with pnpm instead of npm.
Installing it is as easy as pwning yourself:
curl -fsSL https://get.pnpm.io/install.sh | sh -
Getting it to install better-sqlite3 on CentOS 7.4 was a bit more cumbersome. I had to first install node-gyp and then make sure my environment had access to a newer gcc.
email@example.com/node_modules/better-sqlite3: Running install script... ELIFECYCLE Command failed.
This was the error I got, not very clear but ultimately it was because node-gyp was unavailable.
After all this trouble though I can now install better-sqlite3 in seconds instead of minutes.