i deployed my website built with NextJS on a dedicated node server served by Nginx. When sending a transaction, executing Next in dev mode both locally and on the server everything works fine, but when i execute it in production mode i'm getting an unknown error on Phantom wallet and the following error with Solflare: "failed to fill whole buffer".
Production mode works only if executed locally
Any idea about what could cause this? Thanks