Right now, when users upgrade to a new version of the npm package, it happens often that they forget to update the version on the Dockerfile as well, due to which they run into out-of-sync compatibility issues.
I'd imagine the simplest solution right now is to embed an env variable as part of docker image we build on new releases that contains the version, and compare the npm package version with the image version on startup. Throw an error during development, and a warning on production.