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(
148148 const configExport = resolveConfigExport ( pkg ) ;
149149
150150 // 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+ ) {
153158 await Promise . all (
154- configExport . dependencies ? .map ( dep => {
159+ configExport . dependencies . map ( dep => {
155160 // @ts -expect-error legacy module loader doesn't know about these properties
156161 const version = info . pkgJson . devDependencies [ dep ] ;
162+
163+ if ( ! version ) return ;
164+
157165 return packageManager . install ( `${ dep } @${ version } ` ) ;
158- } ) ?? [ ] ,
166+ } ) ,
159167 ) ;
160168 }
161169
You can’t perform that action at this time.
0 commit comments