Ionic-cli: Unable to run any cordova command in React App

Created on 28 Oct 2019  路  1Comment  路  Source: ionic-team/ionic-cli

Description:
Trying to add a platform, plugin to a React generated project the following text is printed

$ ionic cordova platform add android
[ERROR] Cordova is not supported for react projects

Steps to Reproduce:

  1. Create a new ionic project with React.
  2. CD into the DIR
  3. ionic cordova platform add android

Output:

$ ionic cordova platform add android
[ERROR] Cordova is not supported for react projects

My ionic info:

$ ionic info                

Ionic:

   Ionic CLI       : 5.4.4 (/Users/imetallica/.asdf/installs/nodejs/10.16.0/.npm/lib/node_modules/ionic)
   Ionic Framework : @ionic/react 4.11.2

Utility:

   cordova-res : 0.8.1 
   native-run  : 0.2.8 (update available: 0.2.9)

System:

   NodeJS : v10.16.0 (/Users/imetallica/.asdf/installs/nodejs/10.16.0/bin/node)
   npm    : 6.9.0
   OS     : macOS Catalina

Other Information:
https://forum.ionicframework.com/t/error-cordova-is-not-supported-for-react-projects/174601

triage

>All comments

Our current stance on Cordova in React is here: https://ionicframework.com/docs/react/overview#native-tooling

Was this page helpful?
0 / 5 - 0 ratings