ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

[ERROR] Could not determine project type. Ionic 3 CLI

Open rflorat07 opened this issue 9 years ago • 11 comments

sudo npm install -g cordova ionic ionic start helloWorld blank

[ERROR] Could not determine project type.

    For Ionic Angular projects, make sure 'ionic-angular' exists in the dependencies attribute of package.json.
    For Ionic 1 projects, make sure 'ionic' exists in the devDependencies attribute of bower.json.
    
    Alternatively, set type attribute in ionic.config.json to one of: 'ionic-angular', 'ionic1'

rflorat07 avatar May 22 '17 07:05 rflorat07

What does ionic info give you? (Inside and outside project directory please)

janpio avatar May 22 '17 11:05 janpio

Inside: rflorat$ cd 2.Sonido/ rflorat$ ionic info

global packages:

@ionic/cli-utils : 1.1.2
Ionic CLI        : 3.1.2

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-ionic-angular : 1.1.2
Ionic Framework                 : ionic-angular 3.2.1

System:

Node       : v6.10.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.2 Build version 8E2002 
ios-deploy : 1.9.1 
ios-sim    : 5.0.13 

rflorat07 avatar May 22 '17 12:05 rflorat07

outside: rflorat$ cd .. rflorat$ ionic info [ERROR] Could not determine project type.

    For Ionic Angular projects, make sure 'ionic-angular' exists in the dependencies attribute of package.json.
    For Ionic 1 projects, make sure 'ionic' exists in the devDependencies attribute of bower.json.
    
    Alternatively, set type attribute in ionic.config.json to one of: 'ionic-angular', 'ionic1'

rflorat07 avatar May 22 '17 12:05 rflorat07

rflorat$ nvm ls v0.10.32 v4.4.2 -> v6.10.0 system default -> 6.10.0 (-> v6.10.0) node -> stable (-> v6.10.0) (default) stable -> 6.10 (-> v6.10.0) (default) iojs -> N/A (default) lts/* -> lts/boron (-> N/A) lts/argon -> v4.8.2 (-> N/A) lts/boron -> v6.10.2 (-> N/A)

rflorat07 avatar May 22 '17 12:05 rflorat07

Do you have a stray ionic.config.json file outside your project directory?

imhoffd avatar May 22 '17 19:05 imhoffd

I have this setting:

nvm ls v0.10.32 v6.10.0 -> v7.10.0 system default -> 7.10.0 (-> v7.10.0)

ionic info [ERROR] Error occurred while loading plugins. CLI functionality may be limited. Checking for CLI updates now... [WARN] The Ionic CLI has an update available! Please upgrade (you might need sudo):

       npm install -g ionic@latest

global packages:

@ionic/cli-utils : 1.0.0
Ionic CLI        : 3.0.0

System:

Node       : v7.10.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.2 Build version 8E2002 
ios-deploy : 1.9.1 
ios-sim    : 5.0.13 

After upgrade: sudo npm install -g ionic@latest

ionic info

[ERROR] Could not determine project type.

    For Ionic Angular projects, make sure 'ionic-angular' exists in the dependencies attribute of package.json.
    For Ionic 1 projects, make sure 'ionic' exists in the devDependencies attribute of bower.json.
    
    Alternatively, set type attribute in ionic.config.json to one of: 'ionic-angular', 'ionic1'

rflorat07 avatar May 23 '17 07:05 rflorat07

No, he is asking if you have a ionic.config.json file in the folder where you are executing ionic info. This shouldn't be there if it's not an actual Ionic project directory.

janpio avatar May 23 '17 08:05 janpio

OK, piotrowski, thanks very much.

rflorat07 avatar May 23 '17 08:05 rflorat07

insert this line in your ionic.config.json file <"type": "ionic-angular"> or <"type": "ionic1"> (without the tags)

worked for me

erassynathingo avatar Jun 29 '17 01:06 erassynathingo

thanks @erassynathingo you resolve my problem!! thanks you !

chenHungTzu avatar Jun 29 '17 05:06 chenHungTzu

thank you brother, it helped me a lot it's working perfectly

Eliseuplugin avatar Apr 02 '18 14:04 Eliseuplugin