File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,18 @@ class Node(SimpleNamespace):
6868 MIN_VERSION = "18.18.0"
6969
7070
71+ def _determine_nextjs_version () -> str :
72+ default_version = "15.2.4"
73+ if (version := os .getenv ("NEXTJS_VERSION" )) and version != default_version :
74+ from reflex .utils import console
75+
76+ console .warn (
77+ f"You have requested next@{ version } but the supported version is { default_version } , abandon all hope ye who enter here."
78+ )
79+ return version
80+ return default_version
81+
82+
7183class PackageJson (SimpleNamespace ):
7284 """Constants used to build the package.json file."""
7385
@@ -85,7 +97,7 @@ class Commands(SimpleNamespace):
8597 "@emotion/react" : "11.14.0" ,
8698 "axios" : "1.8.3" ,
8799 "json5" : "2.2.3" ,
88- "next" : os . getenv ( "NEXTJS_VERSION" , "15.2.4" ),
100+ "next" : _determine_nextjs_version ( ),
89101 "next-sitemap" : "4.2.3" ,
90102 "next-themes" : "0.4.6" ,
91103 "react" : "19.0.0" ,
You can’t perform that action at this time.
0 commit comments