-
Notifications
You must be signed in to change notification settings - Fork 125
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
[🐛 Bug]: Could not map all functions to an entry in the middleware manifest #244
Comments
Hello, would it be possible for you to try building with the beta release of next-on-pages ( If you are still seeing a problem generating a worker file with the beta release, it would be very much appreciated if some sort of minimal reproduction could be provided 🙂 |
Thank you very much for your quick answer! I am getting a way more verbose error now -> progress :)
I am now investigating where this error comes from (running in edge-runtime locally does not error). |
Is this occurring when deploying to Pages/using Wrangler @felix-schultz? If you haven't already, please ensure that you add the If that doesn't do the trick and you can't identify the cause, I'm happy to investigate this if you have a reproduction. 🙂 |
I am getting the error for The resulting output has a static and functions folder. However after publishing with wrangler publish, no functions are being deployed. No error too. And the functions folder is also not just uploaded as a file directory, so something happens, but without any errors or logs it is hard to tell where things break. Will continue working on this problem tomorrow. There has to be a way to get this to work. |
Reproduction is tricky, I don't have any clue where the problem is and the project is a huge private monorepo. I will try my best to find a way to reproduce the issue and keep you updated! |
If you get the error running next-on-pages @felix-schultz, it won't be able to build a worker file to publish to Pages. The functions directory that Vercel builds ( The static directory ( So, it sounds to me like there is something going wrong when we try to deal with either one of the webpack chunks, or functions, during processing, because our worker file build step marks My concern though, if changing the externals is the solution, is that we might need to then add another webpack plugin to deal with them, as in both of the That's my theory anyway, I can't tell for sure without playing with a project that causes your issue. If that does happen to be the case and you would like to open a PR for it, it'd be hugely beneficial for us if a test app can be provided with it. Since you aren't really able to share a reproduction of your current project which I understand, I would recommend searching through the source code in the functions that Vercel builds to see where |
Update: I have isolated the packages that caused the Due to your great tips (basically already explaining what to do) @james-elicx I tried to just declare For now I have published my own version of I also created a pull request; #246 Thank you very much for your help so far 💯 |
#244 (#246) * Added "node:events" to external config for the functionsmap generation. #244 * Wildcard node modules + Changeset changed node:buffer, node:events -> node:* --------- Co-authored-by: Felix Schultz <[email protected]>
next-on-pages environment related information
Description
When trying to build with
npx @cloudflare/next-on-pages --experimental-minify
I am getting the error:⚡️ ERROR: Could not map all functions to an entry in the middleware manifest.
The output folder looks fine to me too, however I suspect there is a worker.js file missing that enables the functions in the first place. The deployment via wrangler also shows the static assets, while the functions are missing completely.
Reproduction
No response
Pages Deployment Method
Direct Upload (
wrangler pages publish
or the @cloudflare/pages-action GitHub Action)Pages Deployment ID
No response
Additional Information
Output log:
I am trying to use the new parallel rendering feature.
Would you like to help?
The text was updated successfully, but these errors were encountered: