File tree 2 files changed +13
-0
lines changed
packages/cloudflare/src/cli/build
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> {
55
55
buildHelper . checkRunningInsideNextjsApp ( options ) ;
56
56
logger . info ( `App directory: ${ options . appPath } ` ) ;
57
57
buildHelper . printNextjsVersion ( options ) ;
58
+ ensureNextjsVersionSupported ( options ) ;
58
59
buildHelper . printOpenNextVersion ( options ) ;
59
60
60
61
if ( projectOpts . skipNextBuild ) {
@@ -276,3 +277,10 @@ export async function getLatestCompatDate(): Promise<string | undefined> {
276
277
/* empty */
277
278
}
278
279
}
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