@@ -8,6 +8,7 @@ import chalk from 'chalk'
88import { CODE_ROUTER , FILE_ROUTER } from './constants.js'
99import { sortObject } from './utils.js'
1010import { writeConfigFile } from './config-file.js'
11+ import { packageManagerExecute } from './package-manager.js'
1112
1213import type { Environment } from './environment.js'
1314import type { Options } from './types.js'
@@ -484,9 +485,11 @@ export async function createApp(
484485 s ?. start (
485486 `Installing shadcn components (${ Array . from ( shadcnComponents ) . join ( ', ' ) } )...` ,
486487 )
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 ] ,
490493 resolve ( targetDir ) ,
491494 )
492495 s ?. stop ( `Installed additional shadcn components` )
@@ -723,6 +726,6 @@ Use the following commands to start your app:
723726% cd ${ options . projectName }
724727% ${ startCommand }
725728
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 } ` )
727730 }
728731}
0 commit comments