ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 651 forks source link

`ionic info` without having run `npm install` #3932

Open janpio opened 5 years ago

janpio commented 5 years ago

Running ionic info on a fresh checkout of a project without running npm install first leads to some output like this:

λ ionic info                                                                                                                                                                     

[ERROR] Error loading ionic-angular package.json: Error: Cannot find module 'ionic-angular/package'                    
[ERROR] Error loading @ionic/app-scripts package.json: Error: Cannot find module '@ionic/app-scripts/package'          

Ionic:                                                                                                                 

   ionic (Ionic CLI)  : 4.10.3 (C:\Users\Jan\scoop\persist\nvm\nodejs\v10.15.1\node_modules\ionic)                     
   Ionic Framework    : not installed                                                                                  
   @ionic/app-scripts : not installed                                                                                  

Cordova:                                                                                                               

   cordova (Cordova CLI) : 9.0.0                                                                                       
   Cordova Platforms     : not available                                                                               
   Cordova Plugins       : not available                                                                               

System:                                                                                                                

   ios-deploy : 1.9.2                                                                                                  
   NodeJS     : v10.15.1 (C:\Users\Jan\scoop\apps\nvm\current\nodejs\nodejs\node.exe)                                  
   npm        : 6.4.1                                                                                                  
   OS         : Windows 10                                                                                             
   Xcode      : Xcode 10.1                                                                                             

It might be useful to recognize that this is probably because of a missing npm install and educate the user about this.

sakshivicesoftware commented 4 years ago

@janpio but what to do when npm install itself is showing error?

janpio commented 4 years ago

Then you will probably want to debug that, and ask in Slack or the Forum where people perhaps want to help debugging that. You can also create a new issue in this repo of course if you think this is caused by @ionic/cli.

sakshivicesoftware commented 4 years ago

Then you will probably want to debug that, and ask in Slack or the Forum where people perhaps want to help debugging that. You can also create a new issue in this repo of course if you think this is caused by @ionic/cli.

okay thanks for the suggestion