Ionic serve "error updating config.xml"

I’m suddenly getting a weird error when starting ionic serve:

Error updating /Users/kim/WebstormProjects/SNO/config.xml: TypeError: Cannot read property '0' of undefined (CLI v1.2.6)

Error parsing /Users/kim/WebstormProjects/SNO/config.xml: TypeError: Cannot read property '0' of undefined (CLI v1.2.6)

        throw new TypeError('Arguments to path.join must be strings');
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at Object.IonicTask.loadSettings (/usr/local/lib/node_modules/ionic/lib/ionic/serve.js:62:26)
    at (/usr/local/lib/node_modules/ionic/lib/ionic/serve.js:29:8)
    at (/usr/local/lib/node_modules/ionic/lib/ionic.js:455:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/ionic/bin/ionic:10:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

This application is identical with a couple of others that work fine. In fact config.xml has been copied from another application and only the name and id have been changed.

Config.xml sits in the project root, but I still get the error if I move it, which makes me wonder if ionic serve can see it at all.

And BTW I’ve updated to the latest version of ionic.

Any ideas, anyone?


Somehow <content src="index.html"/> was missing from config.xml. Interesting, since it’s supposed to be optional.

I"ll leave this post here for reference.

1 Like