File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed 
packages/@ionic/cli/src/lib/project Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -508,7 +508,7 @@ export abstract class Project implements IProject {
508508    let  pkgPath : string  |  undefined ; 
509509
510510    try  { 
511-       pkgPath  =  pkgName  ? require . resolve ( `${ pkgName }  ,  {  paths : compileNodeModulesPaths ( this . directory )  } )  : this . packageJsonPath ; 
511+       pkgPath  =  pkgName  ? require . resolve ( `${ pkgName } .json ` ,  {  paths : compileNodeModulesPaths ( this . directory )  } )  : this . packageJsonPath ; 
512512      pkg  =  await  readPackageJsonFile ( pkgPath ) ; 
513513    }  catch  ( e : any )  { 
514514      if  ( logErrors )  { 
@@ -521,7 +521,7 @@ export abstract class Project implements IProject {
521521
522522  async  requirePackageJson ( pkgName ?: string ) : Promise < PackageJson >  { 
523523    try  { 
524-       const  pkgPath  =  pkgName  ? require . resolve ( `${ pkgName }  ,  {  paths : compileNodeModulesPaths ( this . directory )  } )  : this . packageJsonPath ; 
524+       const  pkgPath  =  pkgName  ? require . resolve ( `${ pkgName } .json ` ,  {  paths : compileNodeModulesPaths ( this . directory )  } )  : this . packageJsonPath ; 
525525      return  await  readPackageJsonFile ( pkgPath ) ; 
526526    }  catch  ( e : any )  { 
527527      if  ( e  instanceof  SyntaxError )  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments