-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[⚡ Feature]: Allow split deployments with latent nodejs runtime functions #845
Labels
enhancement
New feature or request
Comments
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 |
nickbabcock
added a commit
to nickbabcock/next-on-pages
that referenced
this issue
Aug 27, 2024
The presence of invalid functions shouldn't force a build failure as a deployment can still be valid (and even correct as outlined in cloudflare#845) with invalid functions. This commit adds a `--force` cli option (bike-shedding welcomed) that allows users to opt to ignore invalid functions (and skip more checks in the future?). Closes cloudflare#845
nickbabcock
added a commit
to nickbabcock/next-on-pages
that referenced
this issue
Aug 27, 2024
The presence of invalid functions shouldn't force a build failure as a deployment can still be valid (and even correct as outlined in cloudflare#845) with invalid functions. This commit adds a `--force` cli option (bike-shedding welcomed) that allows users to opt to ignore invalid functions (and skip more checks in the future?). Closes cloudflare#845
nickbabcock
added a commit
to nickbabcock/next-on-pages
that referenced
this issue
Aug 27, 2024
The presence of invalid functions shouldn't force a build failure as a deployment can still be valid (and even correct as outlined in cloudflare#845) with invalid functions. This commit adds a `--force` cli option (bike-shedding welcomed) that allows users to opt to ignore invalid functions (and skip more checks in the future?). Closes cloudflare#845
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
The text was updated successfully, but these errors were encountered: