In my experience, this issue often comes from differences in how development and production environments process type checking. When I encountered a similar error, I discovered that the GET function’s type definitions needed to match those expected by the build system. I ended up adjusting the function signature to better align with Next.js conventions and ensured that the parameter types were explicitly defined, thus preventing the mismatch during device compilations. Once the type definitions were made more explicit and compliant with the strict rules observed during the build, I was able to successfully deploy on Netlify.