-
Notifications
You must be signed in to change notification settings - Fork 127
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
ERROR: Unknown functions manifest version. Expected 2 but found 1. #40
Comments
I am facing the exact same issue. Here's my entire build Log. 2022-12-11T04:54:32.971638Z Cloning repository... |
@szymondlugolecki try upgrading your |
Same on my project with:
Even just with: |
My project uses Mantine which is built on top of emotion. Sadly, Next.js since v12.2.6-canary.5 has stopped supporting emotion #42107, so I cannot upgrade Next to a version higher than 12.2.6. |
The root of the issue here is because let middlewareManifest: MiddlewareManifest;
try {
// Annoying that we don't get this from the `.vercel` directory.
// Maybe we eventually just construct something similar from the `.vercel/output/functions` directory with the same magic filename/precendence rules?
middlewareManifest = JSON.parse(
await readFile(".next/server/middleware-manifest.json", "utf8")
);
} catch {
console.error("⚡️ ERROR: Could not read the functions manifest.");
exit(1);
}
if (middlewareManifest.version !== 2) {
console.error(
`⚡️ ERROR: Unknown functions manifest version. Expected 2 but found ${middlewareManifest.version}.`
);
console.error(
"⚡️ Please report this at https://github.com/cloudflare/next-on-pages/issues."
);
exit(1);
} https://github.com/cloudflare/next-on-pages/blob/main/src/index.ts#L344 For next.js in 12.2.x and lower, next.js set One thing that you can try here, is to bypass this check using patch-package to patch this and remove this check from the next-on-pages code, this may or may not work, I guess you will need to try it out, worst case scenario, next-on-pages has a minimum next.js 12.3.x requirement if (middlewareManifest.version !== 2) {
console.error(
`⚡️ ERROR: Unknown functions manifest version. Expected 2 but found ${middlewareManifest.version}.`
);
console.error(
"⚡️ Please report this at https://github.com/cloudflare/next-on-pages/issues."
);
exit(1);
} |
Hi folks. Thanks for the report. Unfortunately, I don't think we'll add support for earlier Next.js versions, so unfortunately you'll have to upgrade to use |
I'm trying to deploy a NextJS project on CF Pages, but I keep getting this error:
NextJS@12.2.5
Node.js@16.18.1
Reproduction:
https://github.com/szymondlugolecki/next-on-pages-repro
The text was updated successfully, but these errors were encountered: