Ionic info is not showing cordova platform

d:\ionic\btrc_event>ionic info
√ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)  : 4.0.6 (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.11

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : not available

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v8.9.4 (C:\Program Files\nodejs\node.exe)
   npm               : 5.6.0
   OS                : Windows 10

Environment:

   ANDROID_HOME : C:\Users\ismail\AppData\Local\Android\Sdk
d:\ionic\btrc_event>ionic cordova plugin ls
> cordova plugin ls
cordova-plugin-advanced-http 1.11.1 "Advanced HTTP plugin"
cordova-plugin-app-update 1.6.0 "AppUpdate"
cordova-plugin-appversion 1.0.0 "App Version"
cordova-plugin-badge 0.8.7 "Badge"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.0.3 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 2.4.0 "Cordova sqlite storage plugin"
net.js:701
    throw new TypeError(
    ^

TypeError: Invalid data, chunk must be a string or buffer, not object
    at WriteStream.Socket.write (net.js:701:11)
    at process.<anonymous> (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic\bin\ionic:9:63)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emitPendingUnhandledRejections (internal/process/promises.js:94:22)
    at process._tickCallback (internal/process/next_tick.js:189:7)

What does the second code block that you posted have to do with the topic or the “Cordova Platforms : not available” from the first code block?

What does cordova platform list return?

d:\ionic\btrc_event>cordova platform list
‘cordova’ is not recognized as an internal or external command,
operable program or batch file.

You don’t have the Cordova CLI installed.

What does npm list -g --depth=0 return?

cordova globally not installed. problem solved.

I have exactly the same error as OP when running ionic cordova run android:

Package name: com.SORRYYOUMAYNOTSEEWHATIAMWORKING.ON
LAUNCH SUCCESS
[ERROR] An error occurred while running subprocess cordova.

        cordova run android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
net.js:701
    throw new TypeError(
    ^

TypeError: Invalid data, chunk must be a string or buffer, not object
    at WriteStream.Socket.write (net.js:701:11)
    at process.<anonymous> (C:\Users\XXXXX\AppData\Roaming\npm\node_modules\ionic\bin\ionic:9:63)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emitPendingUnhandledRejections (internal/process/promises.js:94:22)
    at process._tickCallback (internal/process/next_tick.js:189:7)

and npm list -g --depth=0 gives me:

+-- cordova@8.0.0
+-- cordova-check-plugins@4.0.2
+-- cordova-plugin-update@0.1.0
+-- ionic@4.0.6
+-- npm@6.1.0
+-- ts@0.0.0
+-- ts-node@7.0.1
`-- typescript@3.0.1

Cordova has been installed globally with npm install -g cordova.

What else can I check to see what is going on?!

Hmmm… Ok, never mind… The problem solved itself after I removed and re-installed 3 plugins in my environment. I had updated those prior to the error appearing, and now it’s fixed.

If it helps anyone, the plugins were:

cordova-plugin-file 6.0.1
cordova-plugin-media 5.0.2
cordova-plugin-advanced-http 1.11.1

This doesn’t seem to be the real solution. I have cordova globally installed, removed platform and all plugins on my current project.

D:\ftproApp>ionic cordova platform list
cordova platform ls
Installed platforms:

Available platforms:
android ~7.0.0
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~5.0.0
www ^3.12.0
net.js:701
throw new TypeError(
^

TypeError: Invalid data, chunk must be a string or buffer, not object
at WriteStream.Socket.write (net.js:701:11)
at process. (C:\Users\evalega\AppData\Roaming\npm\node_modules\ionic\bin\ionic:9:63)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emitPendingUnhandledRejections (internal/process/promises.js:94:22)
at process._tickCallback (internal/process/next_tick.js:189:7)

D:\ftproApp>ionic info
√ Gathering environment info - done!

Ionic:

ionic (Ionic CLI) : 4.1.0 (C:\Users\evalega\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)

System:

Android SDK Tools : 26.1.1
NodeJS : v8.9.4 (C:\Program Files\nodejs\node.exe)
npm : 6.1.0
OS : Windows 10

Environment:

and my npm list is as follows:

±- @angular/cli@6.0.5
±- aurelia-cli@0.32.0
±- bower@1.8.2
±- cordova@8.0.0
±- create-react-app@1.5.1
±- ember-cli@2.18.1
±- ember-cli-update@0.14.0
±- gradle@1.0.9
±- gulp@3.9.1
±- gulp-cli@2.0.1
±- ionic@4.1.0
±- jquery@3.3.1
±- minimatch@3.0.2
±- node-sass@4.7.2
±- nodemon@1.17.5
±- npm@6.1.0
±- npm-windows-upgrade@4.0.1
±- reinstall@1.1.0
±- sequelize-cli@4.0.0
`-- windows-build-tools@1.3.2

can somebody point me to the real solution to this?

Thanks

I’ve got this error since I updated to ionic version 4. I can’t even use $ ionic. Is there any solution.
Thank you.