i’m trying to update cordova platform in my ionic application from android@9 to android@10
ionic cordova platform remove android
ionic cordova platform add android@10
but this command
cordova platform add android@latest
shows this error
ionic cordova platform add android@10
> cordova.cmd platform add android@10
(node:8084) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\objectorarray\package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
Using cordova-fetch for cordova-android@10
Failed to fetch platform cordova-android@10
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
CordovaError: Error: npm: Command failed with exit code 1 Error output:
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\Asus\\Desktop\\SyndicDigit01092021\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.13.2 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Users\Asus\AppData\Local\Programs\Python\Python39\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Users\Asus\AppData\Local\Programs\Python\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Asus\\Desktop\\SyndicDigit01092021\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\Asus\Desktop\SyndicDigit01092021\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Asus\AppData\Local\npm-cache\_logs\2022-02-17T10_14_48_106Z-debug-0.log
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd platform add android@10 exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic info
Ionic:
Ionic CLI : 5.4.16
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.4
Capacitor:
Capacitor CLI : 1.5.3
@capacitor/core : 1.5.3
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : none
Cordova Plugins : cordova-plugin-ionic-webview 4.1.2, (and 31 other plugins)
Utility:
cordova-res : 0.14.1
native-run : 1.4.0
System:
Android SDK Tools : 26.1.1 (C:\Users\Asus\AppData\Local\Android\Sdk)
NodeJS : v16.13.2 (C:\Program Files\nodejs\node.exe)
npm : 8.4.0
OS : Windows 10
any solution please ?
1 post - 1 participant
Read full topic