Why am I seeing a build error TypeError: Cannot read properties of undefined (reading 'sqrt') when using Ably-js with Next.js

You can see more about this on the Next.js issue 58623 . This can be resolved by upgrading the Next.js version to 14.0.4