title: Convert ReactJS-Project to Android-App with ionic capacitor throws Error on WSL
body: <p>I am currently working on a relative simple Web-App and I decided to use ReactJS as a Framework.<br />
  I created a simple demo Project with <code>create-react-app</code> to get started.<br />
  I am working on a Windows 10 system with the Linux Subsystem.</p>
  <p>Now I got tasked to make the Website as an Android and later iOs App accessible.</p>
  <p>The webpage should still be accessible via a browser, so I was thinking I stick with React and build the weppage responsive so on each device the same same Functionality is given.</p>
  <p>I looked at ways to convert a React Project to a &quot;Native&quot;/Hybrid App and stumbled upon Cordova and Ionic.</p>
  <p>I tried following the steps in this article <a href="https://medium.com/how-to-react/convert-your-existing-react-js-app-to-android-or-ios-app-using-the-ionic-capacitor-a127deda75bd" rel="nofollow noreferrer">Convert your existing react js app to android or ios app using the ionic capacitor</a><br />
  I got Android Studio installed on WSL by using a XServer for GUI-Applications.</p>
  <p>Now when I try to add Android to my Project  by using
  <code>ionic capacitor add android --verbose</code> I get the following error:</p>
  <pre><code> ionic:lib Terminal info: { ci: false, shell: '/bin/bash', 
  
  tty: true, windows: false } +0ms
    ionic:lib CLI global options: { _: [ 'capacitor', 'add', 'android' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, project: null, '--': [] } +5ms
    ionic:lib:project Project type from config: @ionic/react (react) +0ms
    ionic:lib:project Project details: { context: 'app', type: 'react', errors: [], configPath: '/mnt/d/ews/ReactWS/pacFrontend/ionic.config.json' } +1ms
    ionic Context: { binPath: '/home/KilledByCheese/.nvm/versions/node/v14.15.0/lib/node_modules/@ionic/cli/bin/ionic', libPath: '/home/KilledByCheese/.nvm/versions/node/v14.15.0/lib/node_modules/@ionic/cli', execPath: '/mnt/d/ews/ReactWS/pacFrontend', version: '6.12.1' } +0ms
  &gt; capacitor add android
    ionic:lib:telemetry Sending telemetry for command: 'ionic capacitor add' [ 'android', '--verbose', '--interactive', '--color' ] +0ms
  Error
  
  at new SubprocessError
  (/home/KilledByCheese/.nvm/versions/node/v14.15.0/lib/node_modules/@ionic/cli/node_modules/@ionic/utils-subprocess/dist/index.js:41:23)
  at ChildProcess.&lt;anonymous&gt;
  (/home/KilledByCheese/.nvm/versions/node/v14.15.0/lib/node_modules/@ionic/cli/node_modules/@ionic/utils-subprocess/dist/index.js:114:27)
  at ChildProcess.emit (events.js:315:20)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
  at onErrorNT (internal/child_process.js:465:16)
  at processTicksAndRejections (internal/process/task_queues.js:80:21)
    ionic Error
    ionic     at new SubprocessError (/home/KilledByCheese/.nvm/versions/node/v14.15.0/lib/node_modules/@ionic/cli/node_modules/@ionic/utils-subprocess/dist/index.js:41:23)
    ionic     at ChildProcess.&lt;anonymous&gt; (/home/KilledByCheese/.nvm/versions/node/v14.15.0/lib/node_modules/@ionic/cli/node_modules/@ionic/utils-subprocess/dist/index.js:114:27)
    ionic     at ChildProcess.emit (events.js:315:20)
    ionic     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
    ionic     at onErrorNT (internal/child_process.js:465:16)
    ionic     at processTicksAndRejections (internal/process/task_queues.js:80:21) +126ms
  </code></pre>
  <p>Now I couldn't find a solution via Google - Is this a Problem/Bug with ionic/Capacitor or with WSL.</p>
  <p>Every Help is Apreciated</p>