File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
packages/cloudflare/src/cli/build Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @opennextjs/cloudflare " : patch
3+ ---
4+
5+ show error on Next.js versions older than v14
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export async function build(projectOpts: ProjectOptions): Promise<void> {
5555 buildHelper . checkRunningInsideNextjsApp ( options ) ;
5656 logger . info ( `App directory: ${ options . appPath } ` ) ;
5757 buildHelper . printNextjsVersion ( options ) ;
58+ ensureNextjsVersionSupported ( options ) ;
5859 buildHelper . printOpenNextVersion ( options ) ;
5960
6061 if ( projectOpts . skipNextBuild ) {
@@ -276,3 +277,10 @@ export async function getLatestCompatDate(): Promise<string | undefined> {
276277 /* empty */
277278 }
278279}
280+
281+ function ensureNextjsVersionSupported ( options : buildHelper . BuildOptions ) {
282+ if ( buildHelper . compareSemver ( options . nextVersion , "14.0.0" ) < 0 ) {
283+ logger . error ( "Next.js version unsupported, please upgrade to version 14 or greater." ) ;
284+ process . exit ( 1 ) ;
285+ }
286+ }
You can’t perform that action at this time.
0 commit comments