This is fixed, which required a full day. It was as simple as clearing the Netlify cache before deploying. Actually it was not simple because it wasn’t apparent that the operation exists or even to try it. It seems that clearing the cache removes the node_modules
directory, which can be important even with what seems to be basic updates to dependencies.