First of all, we are targeting hundrads of thousands and even millions of devices. Not every device is unique, but many are and will change over time. This should give you an idea of the management tooling required. We have such device management tooling today, which by the way supports many platforms apart from snap.
Node.js devices are all running Services developed using JavaScript which in turn may use npm packages. These are not part of the Snap, and are deployed at runtime from the Device Management tool. In most situations this is not a problem using Snap as all services are deployed to the $SNAP_DATA folder.
-However… some npm packages, such as SerialPort comes with C/C++ files that gets compiled at runtime…and then fails.
The problem is that some lib* files in the $SNAP directory are referencing other files in the /usr directory and don’t have access to them.
For more details: https://github.com/snapcore/snapcraft/issues/1605