Skip to content
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

Closed
szymondlugolecki opened this issue Dec 10, 2022 · 6 comments
Closed

Comments

@szymondlugolecki
Copy link

I'm trying to deploy a NextJS project on CF Pages, but I keep getting this error:
obraz

NextJS@12.2.5
Node.js@16.18.1

Reproduction:
https://github.com/szymondlugolecki/next-on-pages-repro

@hrsikeisa
Copy link

I am facing the exact same issue. Here's my entire build Log.

2022-12-11T04:54:32.971638Z Cloning repository...
2022-12-11T04:54:34.213892Z From https://github.com/2hari/db-cloudfare-test
2022-12-11T04:54:34.214604Z * branch 30e1ef9f1d8fee9402458f8abd8709260b5f35e6 -> FETCH_HEAD
2022-12-11T04:54:34.214883Z
2022-12-11T04:54:34.32954Z HEAD is now at 30e1ef9 react 18
2022-12-11T04:54:34.330152Z
2022-12-11T04:54:34.484794Z
2022-12-11T04:54:34.513428Z Success: Finished cloning repository files
2022-12-11T04:54:35.32531Z Installing dependencies
2022-12-11T04:54:35.338172Z Python version set to 2.7
2022-12-11T04:54:39.009659Z Downloading and installing node v16.13.0...
2022-12-11T04:54:39.445798Z Downloading https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-x64.tar.xz...
2022-12-11T04:54:39.911042Z Computing checksum with sha256sum
2022-12-11T04:54:40.042245Z Checksums matched!
2022-12-11T04:54:44.342926Z Now using node v16.13.0 (npm v8.1.0)
2022-12-11T04:54:44.759419Z Started restoring cached build plugins
2022-12-11T04:54:44.773391Z Finished restoring cached build plugins
2022-12-11T04:54:45.307816Z Attempting ruby version 2.7.1, read from environment
2022-12-11T04:54:49.080396Z Using ruby version 2.7.1
2022-12-11T04:54:49.441675Z Using PHP version 5.6
2022-12-11T04:54:49.612382Z 5.2 is already installed.
2022-12-11T04:54:49.640772Z Using Swift version 5.2
2022-12-11T04:54:49.641318Z Started restoring cached node modules
2022-12-11T04:54:49.65742Z Finished restoring cached node modules
2022-12-11T04:54:50.125069Z Installing NPM modules using NPM version 8.1.0
2022-12-11T04:54:51.617791Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.618826Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.619174Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.61944Z npm WARN node_modules/react
2022-12-11T04:54:51.619618Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.619874Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.620096Z npm WARN
2022-12-11T04:54:51.620229Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.620344Z npm WARN peerOptional react@"^16.8.0 || ^17.0.0" from @apollo/client@3.4.8
2022-12-11T04:54:51.620455Z npm WARN node_modules/@apollo/client
2022-12-11T04:54:51.620561Z npm WARN @apollo/client@"^3.4.8" from the root project
2022-12-11T04:54:51.620758Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.620884Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.621016Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.621159Z npm WARN node_modules/react
2022-12-11T04:54:51.621279Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.621395Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.621504Z npm WARN
2022-12-11T04:54:51.62161Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.621714Z npm WARN peer react@"^0.14 || ^15 || ^16 || ^17" from html-react-parser@1.2.8
2022-12-11T04:54:51.621826Z npm WARN node_modules/html-react-parser
2022-12-11T04:54:51.621931Z npm WARN html-react-parser@"^1.2.8" from the root project
2022-12-11T04:54:51.622662Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.622864Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.623028Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.623211Z npm WARN node_modules/react
2022-12-11T04:54:51.623599Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.623762Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.623911Z npm WARN
2022-12-11T04:54:51.624051Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.624199Z npm WARN peer react@"17.0.2" from react-dom@17.0.2
2022-12-11T04:54:51.624312Z npm WARN node_modules/react-dom
2022-12-11T04:54:51.624436Z npm WARN react-dom@"^18.2.0" from the root project
2022-12-11T04:54:51.624558Z npm WARN 5 more (@headlessui/react, nano-css, next, react-tooltip, react-use)
2022-12-11T04:54:51.624702Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.624832Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.624949Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.625083Z npm WARN node_modules/react
2022-12-11T04:54:51.625202Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.62532Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.625453Z npm WARN
2022-12-11T04:54:51.625564Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.625677Z npm WARN peer react@"17.0.2" from react-dom@17.0.2
2022-12-11T04:54:51.625788Z npm WARN node_modules/react-dom
2022-12-11T04:54:51.625897Z npm WARN react-dom@"^18.2.0" from the root project
2022-12-11T04:54:51.626014Z npm WARN 5 more (@headlessui/react, nano-css, next, react-tooltip, react-use)
2022-12-11T04:54:51.626132Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.626247Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.626361Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.626479Z npm WARN node_modules/react
2022-12-11T04:54:51.626592Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.6267Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.626844Z npm WARN
2022-12-11T04:54:51.626953Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.627069Z npm WARN peer react@"17.0.2" from react-dom@17.0.2
2022-12-11T04:54:51.627185Z npm WARN node_modules/react-dom
2022-12-11T04:54:51.627291Z npm WARN react-dom@"^18.2.0" from the root project
2022-12-11T04:54:51.627399Z npm WARN 5 more (@headlessui/react, nano-css, next, react-tooltip, react-use)
2022-12-11T04:54:51.627514Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.62762Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.627725Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.627828Z npm WARN node_modules/react
2022-12-11T04:54:51.62793Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.628054Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.628168Z npm WARN
2022-12-11T04:54:51.628284Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.62855Z npm WARN peer react@"17.0.2" from react-dom@17.0.2
2022-12-11T04:54:51.62869Z npm WARN node_modules/react-dom
2022-12-11T04:54:51.628809Z npm WARN react-dom@"^18.2.0" from the root project
2022-12-11T04:54:51.628919Z npm WARN 5 more (@headlessui/react, nano-css, next, react-tooltip, react-use)
2022-12-11T04:54:51.629048Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.62918Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.629287Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.629404Z npm WARN node_modules/react
2022-12-11T04:54:51.629519Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.629625Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.629729Z npm WARN
2022-12-11T04:54:51.630044Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.630222Z npm WARN peer react@"17.0.2" from react-dom@17.0.2
2022-12-11T04:54:51.630365Z npm WARN node_modules/react-dom
2022-12-11T04:54:51.630488Z npm WARN react-dom@"^18.2.0" from the root project
2022-12-11T04:54:51.630612Z npm WARN 5 more (@headlessui/react, nano-css, next, react-tooltip, react-use)
2022-12-11T04:54:51.630737Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.630852Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.630972Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.631768Z npm WARN node_modules/react
2022-12-11T04:54:51.631897Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.632045Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.632166Z npm WARN
2022-12-11T04:54:51.632291Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.632404Z npm WARN peer react@"^15.6.2 || ^16.0 || ^17" from react-ga@3.3.0
2022-12-11T04:54:51.632528Z npm WARN node_modules/react-ga
2022-12-11T04:54:51.632647Z npm WARN react-ga@"^3.3.0" from the root project
2022-12-11T04:54:51.632844Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.63296Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.633097Z npm WARN Found: react@17.0.2
2022-12-11T04:54:51.633212Z npm WARN node_modules/react
2022-12-11T04:54:51.633364Z npm WARN react@"^18.2.0" from the root project
2022-12-11T04:54:51.633482Z npm WARN 17 more (@apollo/client, @headlessui/react, @heroicons/react, ...)
2022-12-11T04:54:51.633619Z npm WARN
2022-12-11T04:54:51.633727Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.63384Z npm WARN peer react@"^16.8.0 || ^17.0.0" from react-use@17.3.1
2022-12-11T04:54:51.633951Z npm WARN node_modules/react-use
2022-12-11T04:54:51.634434Z npm WARN react-use@"^17.3.1" from the root project
2022-12-11T04:54:51.639038Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:51.639321Z npm WARN While resolving: dynamicbusiness.com@0.1.0
2022-12-11T04:54:51.639454Z npm WARN Found: react-dom@17.0.2
2022-12-11T04:54:51.639584Z npm WARN node_modules/react-dom
2022-12-11T04:54:51.639698Z npm WARN react-dom@"^18.2.0" from the root project
2022-12-11T04:54:51.639824Z npm WARN 5 more (@headlessui/react, nano-css, next, react-tooltip, react-use)
2022-12-11T04:54:51.639935Z npm WARN
2022-12-11T04:54:51.640071Z npm WARN Could not resolve dependency:
2022-12-11T04:54:51.640185Z npm WARN peer react-dom@"^16.8.0 || ^17.0.0" from react-use@17.3.1
2022-12-11T04:54:51.640292Z npm WARN node_modules/react-use
2022-12-11T04:54:51.640413Z npm WARN react-use@"^17.3.1" from the root project
2022-12-11T04:54:51.849523Z npm WARN ERESOLVE overriding peer dependency
2022-12-11T04:54:57.812117Z npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
2022-12-11T04:55:01.368296Z npm WARN deprecated formidable@1.2.2: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
2022-12-11T04:55:01.40681Z npm WARN deprecated superagent@3.8.1: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases.
2022-12-11T04:55:04.244775Z npm WARN deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see axios/axios#3410
2022-12-11T04:55:14.101764Z
2022-12-11T04:55:14.102295Z added 727 packages, and audited 728 packages in 23s
2022-12-11T04:55:14.102468Z
2022-12-11T04:55:14.102652Z 105 packages are looking for funding
2022-12-11T04:55:14.102966Z run npm fund for details
2022-12-11T04:55:14.115173Z
2022-12-11T04:55:14.115556Z 13 vulnerabilities (8 moderate, 4 high, 1 critical)
2022-12-11T04:55:14.115783Z
2022-12-11T04:55:14.115929Z To address issues that do not require attention, run:
2022-12-11T04:55:14.116102Z npm audit fix
2022-12-11T04:55:14.116282Z
2022-12-11T04:55:14.116462Z To address all issues possible (including breaking changes), run:
2022-12-11T04:55:14.116603Z npm audit fix --force
2022-12-11T04:55:14.116817Z
2022-12-11T04:55:14.116959Z Some issues need review, and may require choosing
2022-12-11T04:55:14.117185Z a different dependency.
2022-12-11T04:55:14.11731Z
2022-12-11T04:55:14.117493Z Run npm audit for details.
2022-12-11T04:55:14.133373Z NPM modules installed
2022-12-11T04:55:14.7019Z Installing Hugo 0.54.0
2022-12-11T04:55:15.609128Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2022-12-11T04:55:15.613601Z Started restoring cached go cache
2022-12-11T04:55:15.635722Z Finished restoring cached go cache
2022-12-11T04:55:15.804124Z go version go1.14.4 linux/amd64
2022-12-11T04:55:15.820969Z go version go1.14.4 linux/amd64
2022-12-11T04:55:15.824139Z Installing missing commands
2022-12-11T04:55:15.824416Z Verify run directory
2022-12-11T04:55:15.824562Z Executing user command: npx @cloudflare/next-on-pages --experimental-minify
2022-12-11T04:55:17.029787Z ⚡️ @cloudflare/next-to-pages CLI
2022-12-11T04:55:17.033712Z ⚡️
2022-12-11T04:55:17.033993Z ⚡️ Installing 'vercel' CLI...
2022-12-11T04:55:17.034188Z ⚡️
2022-12-11T04:55:18.93504Z ▲
2022-12-11T04:55:18.935482Z ▲ up to date, audited 728 packages in 2s
2022-12-11T04:55:18.935653Z ▲
2022-12-11T04:55:18.93645Z ▲
2022-12-11T04:55:18.936647Z ▲ 105 packages are looking for funding
2022-12-11T04:55:18.936778Z ▲ run npm fund for details
2022-12-11T04:55:18.93689Z ▲
2022-12-11T04:55:18.948851Z ▲
2022-12-11T04:55:18.950112Z ▲ 13 vulnerabilities (8 moderate, 4 high, 1 critical)
2022-12-11T04:55:18.950361Z ▲
2022-12-11T04:55:18.9505Z ▲ To address issues that do not require attention, run:
2022-12-11T04:55:18.950615Z ▲ npm audit fix
2022-12-11T04:55:18.950725Z ▲
2022-12-11T04:55:18.950832Z ▲ To address all issues possible (including breaking changes), run:
2022-12-11T04:55:18.950939Z ▲ npm audit fix --force
2022-12-11T04:55:18.951072Z ▲
2022-12-11T04:55:18.951182Z ▲ Some issues need review, and may require choosing
2022-12-11T04:55:18.9513Z ▲ a different dependency.
2022-12-11T04:55:18.951502Z ▲
2022-12-11T04:55:18.951687Z ▲ Run npm audit for details.
2022-12-11T04:55:18.951816Z ▲
2022-12-11T04:55:18.958346Z ⚡️
2022-12-11T04:55:18.95865Z ⚡️
2022-12-11T04:55:18.958791Z ⚡️ Completed 'npx vercel build'.
2022-12-11T04:55:18.958908Z ⚡️
2022-12-11T04:55:18.959048Z ⚡️
2022-12-11T04:55:18.959184Z ⚡️ Building project with 'npx vercel build'...
2022-12-11T04:55:18.9593Z ⚡️
2022-12-11T04:55:20.201455Z ▲ Vercel CLI 28.8.0
2022-12-11T04:55:20.201773Z ▲
2022-12-11T04:55:20.669406Z ▲ Installing dependencies...
2022-12-11T04:55:20.669775Z ▲
2022-12-11T04:55:22.170037Z ▲
2022-12-11T04:55:22.17038Z ▲ up to date in 1s
2022-12-11T04:55:22.170527Z ▲
2022-12-11T04:55:22.170658Z ▲
2022-12-11T04:55:22.17077Z ▲ 105 packages are looking for funding
2022-12-11T04:55:22.170881Z ▲ run npm fund for details
2022-12-11T04:55:22.171006Z ▲
2022-12-11T04:55:22.181035Z ▲ Detected Next.js version: 12.1.0
2022-12-11T04:55:22.181407Z ▲
2022-12-11T04:55:22.191286Z ▲ Detected package-lock.json generated by npm 7+...
2022-12-11T04:55:22.19179Z ▲
2022-12-11T04:55:22.192103Z ▲ Running "npm run build"
2022-12-11T04:55:22.192264Z ▲
2022-12-11T04:55:22.68179Z ▲
2022-12-11T04:55:22.682141Z ▲ > dynamicbusiness.com@0.1.0 build
2022-12-11T04:55:22.682302Z ▲ > next build
2022-12-11T04:55:22.682435Z ▲
2022-12-11T04:55:22.682568Z ▲
2022-12-11T04:55:23.580503Z ▲ warn - You have enabled experimental feature(s).
2022-12-11T04:55:23.580862Z ▲
2022-12-11T04:55:23.58103Z ▲ warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use them at your own risk.
2022-12-11T04:55:23.581169Z ▲
2022-12-11T04:55:23.581296Z ▲
2022-12-11T04:55:23.581747Z ▲ warn - SWC minify release candidate enabled. https://nextjs.org/docs/messages/swc-minify-enabled
2022-12-11T04:55:23.582102Z ▲
2022-12-11T04:55:24.599451Z ▲ Attention: Next.js now collects completely anonymous telemetry regarding usage.
2022-12-11T04:55:24.599871Z ▲
2022-12-11T04:55:24.600042Z ▲ This information is used to shape Next.js' roadmap and prioritize features.
2022-12-11T04:55:24.600192Z ▲ You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2022-12-11T04:55:24.60031Z ▲ https://nextjs.org/telemetry
2022-12-11T04:55:24.600509Z ▲
2022-12-11T04:55:24.600635Z ▲
2022-12-11T04:55:24.601509Z ▲
2022-12-11T04:55:24.632218Z ▲ Browserslist: caniuse-lite is outdated. Please run:
2022-12-11T04:55:24.632839Z ▲ npx browserslist@latest --update-db
2022-12-11T04:55:24.633523Z ▲ Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
2022-12-11T04:55:24.633692Z ▲
2022-12-11T04:55:24.653112Z ▲ info - Checking validity of types...
2022-12-11T04:55:24.653504Z ▲
2022-12-11T04:55:30.353968Z ▲ Browserslist: caniuse-lite is outdated. Please run:
2022-12-11T04:55:30.354322Z ▲ npx browserslist@latest --update-db
2022-12-11T04:55:30.354801Z ▲ Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
2022-12-11T04:55:30.354956Z ▲
2022-12-11T04:55:32.446052Z ▲
2022-12-11T04:55:32.446341Z ▲ ./src/pages/comments/index.js
2022-12-11T04:55:32.446481Z ▲ 32:6 Warning: React Hook useEffect has a missing dependency: 'userProfile'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
2022-12-11T04:55:32.44661Z ▲ 38:6 Warning: React Hook useEffect has missing dependencies: 'loadingUser' and 'router'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
2022-12-11T04:55:32.446747Z ▲
2022-12-11T04:55:32.446881Z ▲ ./src/pages/search.js
2022-12-11T04:55:32.447013Z ▲ 45:6 Warning: React Hook useEffect has a missing dependency: 'featchSeachPosts'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
2022-12-11T04:55:32.447143Z ▲
2022-12-11T04:55:32.447253Z ▲ ./src/components/CommentsList.js
2022-12-11T04:55:32.447366Z ▲ 47:6 Warning: React Hook useEffect has a missing dependency: 'postId'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
2022-12-11T04:55:32.447474Z ▲ 61:6 Warning: React Hook useEffect has a missing dependency: 'postId'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
2022-12-11T04:55:32.447586Z ▲
2022-12-11T04:55:32.447695Z ▲ ./src/components/Layout.js
2022-12-11T04:55:32.447803Z ▲ 24:6 Warning: React Hook useEffect has missing dependencies: 'disabled' and 'setDisabled'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
2022-12-11T04:55:32.447914Z ▲
2022-12-11T04:55:32.44805Z ▲ ./src/components/comments/DesktopSidebar.js
2022-12-11T04:55:32.448174Z ▲ 28:21 Warning: Do not use . Use Image from 'next/image' instead. See https://nextjs.org/docs/messages/no-img-element. @next/next/no-img-element
2022-12-11T04:55:32.448289Z ▲
2022-12-11T04:55:32.448399Z ▲ info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
2022-12-11T04:55:32.448506Z ▲
2022-12-11T04:55:32.463453Z ▲ info - Creating an optimized production build...
2022-12-11T04:55:32.466132Z ▲
2022-12-11T04:55:32.466374Z ▲ warn - using beta Middleware (not covered by semver) - https://nextjs.org/docs/messages/beta-middleware
2022-12-11T04:55:32.467031Z ▲
2022-12-11T04:55:32.948162Z ▲ Browserslist: caniuse-lite is outdated. Please run:
2022-12-11T04:55:32.948499Z ▲ npx browserslist@latest --update-db
2022-12-11T04:55:32.948659Z ▲
2022-12-11T04:55:32.948794Z ▲ Why you should do it regularly:
2022-12-11T04:55:32.948921Z ▲ https://github.com/browserslist/browserslist#browsers-data-updating
2022-12-11T04:55:32.949051Z ▲
2022-12-11T04:55:34.546648Z ▲ Browserslist: caniuse-lite is outdated. Please run:
2022-12-11T04:55:34.547006Z ▲ npx browserslist@latest --update-db
2022-12-11T04:55:34.547175Z ▲ Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
2022-12-11T04:55:34.547311Z ▲
2022-12-11T04:55:34.589759Z ▲
2022-12-11T04:55:34.590156Z ▲
2022-12-11T04:55:34.590566Z ▲ warn - You have enabled the JIT engine which is currently in preview.
2022-12-11T04:55:34.590934Z ▲ warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
2022-12-11T04:55:34.591242Z ▲
2022-12-11T04:55:48.191508Z ▲ info - Compiled successfully
2022-12-11T04:55:48.192257Z ▲
2022-12-11T04:55:48.192465Z ▲ info - Collecting page data...
2022-12-11T04:55:48.192605Z ▲
2022-12-11T04:55:50.667197Z ▲ Page Size First Load JS
2022-12-11T04:55:50.667572Z ▲ ┌ ℇ / 12.1 kB 159 kB
2022-12-11T04:55:50.667755Z ▲ ├ /_app 0 B 120 kB
2022-12-11T04:55:50.667916Z ▲ ├ ƒ /_middleware 36.4 kB 156 kB
2022-12-11T04:55:50.668314Z ▲ ├ ℇ /[...slug] 20.5 kB 171 kB
2022-12-11T04:55:50.668487Z ▲ ├ λ /404 766 B 147 kB
2022-12-11T04:55:50.668921Z ▲ ├ λ /500 768 B 147 kB
2022-12-11T04:55:50.669112Z ▲ ├ λ /api/add-list-member 0 B 120 kB
2022-12-11T04:55:50.669251Z ▲ ├ λ /api/auth/cookie 0 B 120 kB
2022-12-11T04:55:50.669374Z ▲ ├ λ /api/revalidate/generate/author 0 B 120 kB
2022-12-11T04:55:50.669492Z ▲ ├ λ /api/revalidate/generate/category 0 B 120 kB
2022-12-11T04:55:50.669609Z ▲ ├ λ /api/revalidate/generate/story 0 B 120 kB
2022-12-11T04:55:50.669732Z ▲ ├ λ /api/revalidate/story 0 B 120 kB
2022-12-11T04:55:50.669856Z ▲ ├ λ /api/siteconfig 0 B 120 kB
2022-12-11T04:55:50.67011Z ▲ ├ λ /api/slack/comment 0 B 120 kB
2022-12-11T04:55:50.67042Z ▲ ├ λ /api/slack/login 0 B 120 kB
2022-12-11T04:55:50.670641Z ▲ ├ λ /api/toxicity-check 0 B 120 kB
2022-12-11T04:55:50.67084Z ▲ ├ λ /api/zapier/comment 0 B 120 kB
2022-12-11T04:55:50.671066Z ▲ ├ ℇ /author/[...slug] 2.27 kB 156 kB
2022-12-11T04:55:50.671261Z ▲ ├ ℇ /category/[...slug] 7.11 kB 161 kB
2022-12-11T04:55:50.671439Z ▲ ├ ℇ /comments 21.1 kB 155 kB
2022-12-11T04:55:50.671621Z ▲ ├ ℇ /feed.xml 246 B 120 kB
2022-12-11T04:55:50.671803Z ▲ ├ ℇ /page/[...slug] 661 B 147 kB
2022-12-11T04:55:50.672008Z ▲ ├ ℇ /page/advertise 37.8 kB 184 kB
2022-12-11T04:55:50.672251Z ▲ ├ ℇ /search 56 kB 203 kB
2022-12-11T04:55:50.67257Z ▲ ├ ℇ /sitemap.xml 254 B 120 kB
2022-12-11T04:55:50.672777Z ▲ ├ ℇ /sitemap/authorpage/[id] 262 B 120 kB
2022-12-11T04:55:50.673033Z ▲ ├ ℇ /sitemap/categorypage/[id] 264 B 120 kB
2022-12-11T04:55:50.673244Z ▲ ├ ℇ /sitemap/pages 255 B 120 kB
2022-12-11T04:55:50.673442Z ▲ ├ ℇ /sitemap/postpage/[id] 261 B 120 kB
2022-12-11T04:55:50.673596Z ▲ ├ ℇ /sitemap/tagpage/[id] 259 B 120 kB
2022-12-11T04:55:50.673738Z ▲ └ ℇ /tag/[...slug] 2.06 kB 156 kB
2022-12-11T04:55:50.673957Z ▲ + First Load JS shared by all 120 kB
2022-12-11T04:55:50.674125Z ▲ ├ chunks/framework-37ce82f549352701.js 45.4 kB
2022-12-11T04:55:50.674258Z ▲ ├ chunks/main-2132b4c166dac760.js 28 kB
2022-12-11T04:55:50.674385Z ▲ ├ chunks/pages/_app-800187b8facc72b5.js 45 kB
2022-12-11T04:55:50.674511Z ▲ ├ chunks/webpack-8554e80ad42499b6.js 1.7 kB
2022-12-11T04:55:50.674639Z ▲ └ css/afc41b29a1c4acba.css 8.96 kB
2022-12-11T04:55:50.674762Z ▲
2022-12-11T04:55:50.674892Z ▲
2022-12-11T04:55:50.675054Z ▲ ƒ (Middleware) intercepts requests (uses _middleware)
2022-12-11T04:55:50.675183Z ▲ ℇ (Streaming) server-side renders with streaming (uses React 18 SSR streaming or Server Components)
2022-12-11T04:55:50.67531Z ▲ λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
2022-12-11T04:55:50.675436Z ▲
2022-12-11T04:55:50.675564Z ▲
2022-12-11T04:55:51.29492Z ▲ Traced Next.js server files in: 430.338ms
2022-12-11T04:55:51.2953Z ▲
2022-12-11T04:55:53.265733Z ▲ Created all serverless functions in: 1.969s
2022-12-11T04:55:53.266221Z ▲
2022-12-11T04:55:53.321656Z ▲ Collected static files (public/, static/, .next/static): 17.825ms
2022-12-11T04:55:53.322007Z ▲
2022-12-11T04:55:55.116104Z ▲ Build Completed in .vercel/output [34s]
2022-12-11T04:55:55.116409Z ▲
2022-12-11T04:55:55.190231Z ⚡️
2022-12-11T04:55:55.190788Z ⚡️
2022-12-11T04:55:55.190999Z ⚡️ Completed 'npx vercel build'.
2022-12-11T04:55:55.191163Z ⚡️
2022-12-11T04:55:55.426261Z ⚡️ ERROR: Unknown functions manifest version. Expected 2 but found 1.
2022-12-11T04:55:55.426668Z ⚡️ Please report this at https://github.com/cloudflare/next-on-pages/issues.
2022-12-11T04:55:55.447927Z Failed: build command exited with code: 1
2022-12-11T04:55:56.700729Z Failed: an internal error occurred

@arielvieira
Copy link

@szymondlugolecki try upgrading your next package to 12.3.2 version

@matteobattista
Copy link

Same on my project with: npx @cloudflare/next-on-pages --experimental-minify

[...]
▲ Build Completed in .vercel/output [18s]
▲ 
⚡️
⚡️
⚡️ Completed 'npx vercel build'.
⚡️
⚡️ ERROR: Unknown functions manifest version. Expected 2 but found 1.
⚡️ Please report this at https://github.com/cloudflare/next-on-pages/issues.
  • node: 17.7.1
  • react: 18.2.0
  • next: 12.2.6 (...and other nextjs versions)

Even just with: npx @cloudflare/next-on-pages

@szymondlugolecki
Copy link
Author

szymondlugolecki commented Dec 20, 2022

@szymondlugolecki try upgrading your next package to 12.3.2 version

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.

@arielvieira
Copy link

@szymondlugolecki try upgrading your next package to 12.3.2 version

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 next-on-pages is relaying on next/vercel build internals and its using the output from .next/server/middleware-manifest.json to detect and handle any middleware and functions in your Next.js project, I think next-on-pages doesn't work on 12.2.x or lower due to this check, can you confirm this @GregBrimble?

  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 middlewareManifest.version = 1 and for next 12.3.x and higher, next.js is setting this to middlewareManifest.version = 2

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);
  }

@GregBrimble
Copy link
Member

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 @cloudflare/next-on-pages (else, use next export to get a static export of your app).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants