@@ -14,6 +14,7 @@ import {
1414 createSerializedOptions ,
1515 getAllAddOns ,
1616 getFrameworkById ,
17+ getFrameworkByName ,
1718 getFrameworks ,
1819 initAddOn ,
1920 initStarter ,
@@ -258,14 +259,18 @@ Remove your node_modules directory and package lock file and re-install.`,
258259 '--framework <type>' ,
259260 `project framework (${ availableFrameworks . join ( ', ' ) } )` ,
260261 ( value ) => {
261- if ( ! availableFrameworks . includes ( value ) ) {
262+ if (
263+ ! availableFrameworks . some (
264+ ( f ) => f . toLowerCase ( ) === value . toLowerCase ( ) ,
265+ )
266+ ) {
262267 throw new InvalidArgumentError (
263268 `Invalid framework: ${ value } . Only the following are allowed: ${ availableFrameworks . join ( ', ' ) } ` ,
264269 )
265270 }
266271 return value
267272 } ,
268- defaultFramework || 'react-cra ' ,
273+ defaultFramework || 'React ' ,
269274 )
270275 }
271276
@@ -334,7 +339,7 @@ Remove your node_modules directory and package lock file and re-install.`,
334339 program . action ( async ( projectName : string , options : CliOptions ) => {
335340 if ( options . listAddOns ) {
336341 const addOns = await getAllAddOns (
337- getFrameworkById ( options . framework || defaultFramework || 'react-cra ' ) ! ,
342+ getFrameworkByName ( options . framework || defaultFramework || 'React ' ) ! ,
338343 defaultMode ||
339344 convertTemplateToMode ( options . template || defaultTemplate ) ,
340345 )
@@ -354,8 +359,8 @@ Remove your node_modules directory and package lock file and re-install.`,
354359 ...options ,
355360 } as CliOptions
356361
357- cliOptions . framework = getFrameworkById (
358- options . framework || defaultFramework || 'react-cra ' ,
362+ cliOptions . framework = getFrameworkByName (
363+ options . framework || defaultFramework || 'React ' ,
359364 ) ! . id
360365
361366 if ( defaultMode ) {
0 commit comments