Command "cordova" failed with exit code: null



  • I have installed cordova as described in the docs. I am on Kubuntu 19.04. When running

    quasar mode add cordova
    

    I get

    app:mode-cordova Creating Cordova source folder... +0ms
     app:spawn [sync] Running "cordova create src-cordova com.example.app Example " +1ms
    
    
     app:spawn ⚠️  Command "cordova" failed with exit code: null +0ms
     app:spawn ⚠️  Please globally install "cordova" +0ms
     app:mode-cordova ⚠️  There was an error trying to install Cordova support 
    

    Then I tried the command directly

    cordova create src-cordova com.example.app Example
    

    and it worked. It created the src-cordova folder. Not sure why quasar mode add cordova not working.

    I added android with cd src-cordova && cordova platform add android and afterwards cordova requirements is working.

    Now I run quasar dev -m cordova -T android I get

     DONE  Compiled successfully in 3971ms                                                                                                                                                                                                                                 17:32:44
    
    ℹ 「wds」: Project is running at http://192.168.1.100:8081/
    ℹ 「wds」: webpack output is served from 
    ℹ 「wds」: 404s will fallback to /index.html
     app:cordova-conf Updated Cordova config.xml +4s
     app:spawn Running "cordova run android" +0ms
    

    But I can’t open http://192.168.1.100:8081/



  • @bernhard the log says Please globally install "cordova", maybe you only have it installed locally. you are on cordova mode, it should be running in a device or emulator.



  • Thanks for your reply!

    First of all - I have updated the question with more infos about the problem.

    And no, cordova is installed globally:

    npm list -g --depth 0 | grep cordova
    ├── cordova@9.0.0
    


  • I reinstalled node with nvm and it worked.

    For mor details, have a look at https://stackoverflow.com/questions/59973611/node-js-child-process-has-no-access-to-global-modules


Log in to reply