Tuesday, January 24, 2017

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

Leave a Comment

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.

5 Answers

Answers 1

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.

Answers 2

After creating your new project, you need to step into the projects folder, in there you will find the config file and you can run ionic serve.

$ ionic start myApp tabs $ cd myApp $ ionic serve 

Be sure that you are running last version of ionic and cordova.

Answers 3

install ionic using.

npm install -g ionic@latest

or

refer link : http://ionicframework.com/docs/guide/installation.html

Answers 4

As per logs you are getting Cordova CLI: undefined. Seems like an issue with CLI installation. Try reinstalling and that should solve your problem.

Answers 5

I would suggest you to start the fresh installation. And remove existing cordova and ionic

install cordova & ionic with npm install -g cordova ionic

Then install the template ionic start --v2 myApp tabs Check out this link https://ionicframework.com/getting-started/

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment