I'm using cordova CLI. I'm trying to add platform but is doesn't work. Nodejs, npm, android-sdk-linux are all installed.
root@hack-ubuntu:/opt/app# cordova platform add android
Adding android project...
/root/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/templates/cordova/lib/AndroidStudio.js:16
for(file of eclipseFiles) {
^^
Running command: /root/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/create /opt/app/platforms/android io.cordova.hellocordova HelloCordova --cli/root/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/templates/cordova/lib/AndroidStudio.js:16
for(file of eclipseFiles) {
^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/root/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/templates/cordova/lib/AndroidProject.js:24:21)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Error: /root/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/create:Command failed with exit code 8