I have a node server application using Fastify. I can build and run the image locally without a trouble. But when I deploy to the cloud, it fails to start and gives Uncaught signal: 11 - Segmentation fault. After doing some digging I found that it's due to a 3rd party library and problem goes away when I remove it. Library is https://www.npmjs.com/package/@transmute/vc.js
Not using the library is not an option unfortunately. Everything works fine locally but fails in the cloud. I tried different node versions from 14.18 to latest. Also I tried increasing container memory limit up to 1024Mi but no luck.
Anyone have an idea?