Monday, 3 April 2017

phonegap platform add ios - "Unexpected token =>" error

I have a Phonegap app and need to build it in a Mac. Everything works in a machine and I'm trying to configure a new one, but on this, when I run phonegap platform add ios I receive the following error:

$ phonegap platform add ios
/usr/local/lib/node_modules/phonegap/lib/phonegap/util/connect-proxy.js:21
                fs.readFile(settings, (err, data) => {
                                                  ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/phonegap/lib/phonegap/serve.js:9:23)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

Both Macs are running with node v0.12.7 and npm 2.11.3.



via June

No comments:

Post a Comment