File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -148,14 +148,22 @@ export async function fetchRemotePackage(
148
148
const configExport = resolveConfigExport ( pkg ) ;
149
149
150
150
// Install whitelisted deps
151
- // @ts -expect-error legacy module loader doesn't know about these properties
152
- if ( info . pkgJson ) {
151
+ if (
152
+ // @ts -expect-error legacy module loader doesn't know about these properties
153
+ info . pkgJson &&
154
+ // @ts -expect-error legacy module loader doesn't know about these properties
155
+ info . pkgJson . devDependencies &&
156
+ configExport . dependencies
157
+ ) {
153
158
await Promise . all (
154
- configExport . dependencies ? .map ( dep => {
159
+ configExport . dependencies . map ( dep => {
155
160
// @ts -expect-error legacy module loader doesn't know about these properties
156
161
const version = info . pkgJson . devDependencies [ dep ] ;
162
+
163
+ if ( ! version ) return ;
164
+
157
165
return packageManager . install ( `${ dep } @${ version } ` ) ;
158
- } ) ?? [ ] ,
166
+ } ) ,
159
167
) ;
160
168
}
161
169
You can’t perform that action at this time.
0 commit comments