0
我正在使用cordova CLI。我正在嘗試添加平臺,但不起作用。 Nodejs,npm,android-sdk-linux都已安裝。科爾多瓦不能添加平臺
[email protected]:/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
瀏覽器平臺是否工作? '科多瓦平臺添加瀏覽器' – eb1