SyntaxError when trying to add platform

I just created a new app, when I try to add a platform (either ios or android) I get an error message about installing plugins. I tried with Cordova 3.5 and 3.4. With 3.5 the problem was supposedly a syntax error in the “ionic-keyboard” plugin. I have tried this both with the ionic commands and with cordova commands. Any help is much appreciated.

ionic platform add ios

This is the output with Cordova 3.4:

SyntaxError: Unexpected token 
    at Object.parse (native)
    at Object.get_platform_json (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/config-changes.js:429:21)
    at isPluginInstalled (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:197:42)
    at runInstall (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:223:9)
    at /usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:46:16
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:821:14
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)

It seems that maybe this was due to the fact that the project was located on a samba share, which cordova has a history of problems with. The problem doesn’t occur if I create the app in my home directory.

Hey there, glad to see you found the issue and were able to resolve it