Open nickbabcock opened 3 months ago
I tested a build that removed the check:
diff --git a/packages/next-on-pages/src/buildApplication/processVercelFunctions/invalidFunctions.ts b/packages/next-on-pages/src/buildApplication/processVercelFunctions/invalidFunctions.ts
index d6d92d7..b3a0ff9 100644
--- a/packages/next-on-pages/src/buildApplication/processVercelFunctions/invalidFunctions.ts
+++ b/packages/next-on-pages/src/buildApplication/processVercelFunctions/invalidFunctions.ts
@@ -45,13 +45,6 @@ export async function checkInvalidFunctions(
await tryToFixInvalidFuncsWithValidIndexAlternative(collectedFunctions);
await tryToFixInvalidDynamicISRFuncs(collectedFunctions);
-
- if (collectedFunctions.invalidFunctions.size > 0) {
- await printInvalidFunctionsErrorMessage(
- collectedFunctions.invalidFunctions,
- );
- process.exit(1);
- }
}
/**
And I was able to successfully able to port the application to cloudflage pages, and everything works as expected.
This confirms that the check is not exhaustive and can reject good deployments.
Not sure how this should be incorporated (I think I'm still leaning towards --force
), but I'd love to not need to maintain a patched version of next-on-pages.
Description
I'm currently running a next.js app on vercel. The next.js app contains a mix of edge and nodejs APIs, however the nodejs endpoints do not run on vercel (due to a body size limit), and are deployed on a separate server. Vercel will proxy to this server with the help of a conditional rewrite defined in the next.config.js
This allows the best of both worlds: the entire API can be defined in next.js and ran locally, and then divvied up for a production deployment.
I want to try out cloudflare's Next on pages but am receiving the following error:
As far as I can tell, the invalid function check is a heuristic that is eagerly throwing an error for functions that can never be invoked.
My request:
--force
🤔 ?)Additional Information
No response
Would you like to help?