@@ -8,6 +8,7 @@ import chalk from 'chalk'
8
8
import { CODE_ROUTER , FILE_ROUTER } from './constants.js'
9
9
import { sortObject } from './utils.js'
10
10
import { writeConfigFile } from './config-file.js'
11
+ import { packageManagerExecute } from './package-manager.js'
11
12
12
13
import type { Environment } from './environment.js'
13
14
import type { Options } from './types.js'
@@ -484,9 +485,11 @@ export async function createApp(
484
485
s ?. start (
485
486
`Installing shadcn components (${ Array . from ( shadcnComponents ) . join ( ', ' ) } )...` ,
486
487
)
487
- await environment . execute (
488
- 'npx' ,
489
- [ 'shadcn@canary' , 'add' , '--silent' , '--yes' , ...shadcnComponents ] ,
488
+ await packageManagerExecute (
489
+ environment ,
490
+ options . packageManager ,
491
+ 'shadcn@latest' ,
492
+ [ 'add' , '--silent' , '--yes' , ...shadcnComponents ] ,
490
493
resolve ( targetDir ) ,
491
494
)
492
495
s ?. stop ( `Installed additional shadcn components` )
@@ -723,6 +726,6 @@ Use the following commands to start your app:
723
726
% cd ${ options . projectName }
724
727
% ${ startCommand }
725
728
726
- Please read README.md for more information on testing, styling, adding routes, react-query, etc.${ errorStatement } ` )
729
+ Please read the README.md for more information on testing, styling, adding routes, react-query, etc.${ errorStatement } ` )
727
730
}
728
731
}
0 commit comments