File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 11import ts from 'typescript' ;
22
3- // TS compiler is not able to resolve the `motion` package
3+ // TS compiler is not able to resolve some packages
44// so this is a work-around so that we can be sure to flag
55// it as an external package that we need to install
6- const unresolvableList = [ 'motion' ] ;
6+ const unresolvableList = [
7+ 'motion' ,
8+ '@dnd-kit/core' ,
9+ '@dnd-kit/sortable' ,
10+ '@dnd-kit/modifiers' ,
11+ '@dnd-kit/utilities' ,
12+ ] ;
713
814// Returns true if a given import is external
915export const isExternalImport = (
Original file line number Diff line number Diff line change @@ -12,10 +12,14 @@ export const runPackageManagerInstall = (
1212 if ( typeof inlineDepList === 'string' && inlineDepList . length ) {
1313 console . log ( 'Installing dependencies from inline pattern 🪄' ) ;
1414 // Use NPM if we find a package-lock.json file, otherwise we'll default to yarn
15- execSync ( foundPackageLock ? npmInstallScript : yarnAddScript , {
16- encoding : 'utf-8' ,
17- } ) ;
18- console . log ( 'Inline example created, with all necessary dependencies ✅' ) ;
19- successMessage ( type ) ;
15+ try {
16+ execSync ( foundPackageLock ? npmInstallScript : yarnAddScript , {
17+ encoding : 'utf-8' ,
18+ } ) ;
19+ console . log ( 'Inline example created, with all necessary dependencies ✅' ) ;
20+ successMessage ( type ) ;
21+ } catch ( error ) {
22+ console . log ( 'Error installing dependencies' , error ) ;
23+ }
2024 }
2125} ;
You can’t perform that action at this time.
0 commit comments