Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't find ionic.config.json file. Are you in an Ionic project?

I am new to Ionic and trying to run ionic serve to test my application but I keep getting this error:

Couldn't find ionic.config.json file. Are you in an Ionic project?

On running ionic info, I get the following:

 $ ionic info
******************************************************
 Dependency warning - for the CLI to run correctly,
 it is highly recommended to install/upgrade the following:

 Please update your Cordova CLI to version  >=4.2.0 `npm install -g cordova`

******************************************************

Your system information:

Cordova CLI: undefined
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.1.7
OS: Windows 7
Node Version: v4.4.5

Tried it with Couldn't find ionic.config.json file but couldn't resolve the issue.

I am also getting this trace while creating an application with ionic start myApp tabs:

Installing npm packages (may take a minute or two)...
Error with start Error: spawn UNKNOWN
    at exports._errnoException (util.js:870:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at Object.exports.spawn (child_process.js:362:9)
    at spawn (C:\Users\user\AppData\Roaming\npm\node_modules\ionic\node_modules\                                                            ionic-app-lib\node_modules\cross-spawn\index.js:17:18)
    at Object.runSpawnCommand (C:\Users\user\AppData\Roaming\npm\node_modules\io                                                            nic\node_modules\ionic-app-lib\lib\start.js:56:17)
    at C:\Users\user\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-a                                                            pp-lib\lib\start.js:104:20
    at _fulfilled (C:\Users\user\AppData\Roaming\npm\node_modules\ionic\node_mod                                                            ules\q\q.js:787:54)
    at self.promiseDispatch.done (C:\Users\user\AppData\Roaming\npm\node_modules                                                            \ionic\node_modules\q\q.js:816:30)
    at Promise.promise.promiseDispatch (C:\Users\user\AppData\Roaming\npm\node_m                                                            odules\ionic\node_modules\q\q.js:749:13)
    at C:\Users\user\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:                                                            557:44

Can someone please help here.

like image 331
Aakash Thakur Avatar asked Jan 14 '17 21:01

Aakash Thakur


People also ask

Where is ionic config JSON?

Configuration values are stored in JSON files. The Ionic CLI maintains a global configuration file, usually located at ~/. ionic/config. json , and project configuration files, usually at the project's root directory as ionic.

What is ionic config?

Ionic Config provides a way to change the properties of components globally across an app. It can set the app mode, tab button layout, animations, and more.


1 Answers

I think your first machine have ionic version < 2.0.0, the other one >= 2.0.0

If you found file named ionic.project rename it to ionic.config.json

Hope this will help you.

like image 148
Rohit Dhiman Avatar answered Oct 17 '22 04:10

Rohit Dhiman