I’m trying to deploy Next.js in Cloudflare Pages through Github, but I’m getting this error, while I followed the steps from the Cloudflare GUI. What am I doing wrong?
00:43:08.964 | Executing user command: npx @cloudflare/next-on-pages --experimental-minify |
---|---|
00:43:16.202 | /opt/buildhome/.npm/_npx/1136/lib/node_modules/@cloudflare/next-on-pages/dist/index.js:3771 |
00:43:16.202 | value = parts[1] ?? null; |
00:43:16.202 | ^ |
00:43:16.202 | |
00:43:16.202 | SyntaxError: Unexpected token ‘?’ |
00:43:16.203 | at wrapSafe (internal/modules/cjs/loader.js:1054:16) |
00:43:16.203 | at Module._compile (internal/modules/cjs/loader.js:1102:27) |
00:43:16.203 | at Object.Module._extensions…js (internal/modules/cjs/loader.js:1158:10) |
00:43:16.203 | at Module.load (internal/modules/cjs/loader.js:986:32) |
00:43:16.203 | at Function.Module._load (internal/modules/cjs/loader.js:879:14) |
00:43:16.203 | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) |
00:43:16.203 | at internal/main/run_main_module.js:17:47 |
00:43:16.355 | Failed: build command exited with code: 1 |
00:43:17.132 | Failed: error occurred while running build command |