Restore from git

  • Hi,

    I’ve created quasar app, added cordova, built, run on Android emulator and push to git.

    On another PC I clone my repo, execute ‘npm i’, ‘quasar dev -m cordova -T android’ and get the following error:
    UnhandledPromiseRejectionWarning: CordovaError: Current working directory is not a Cordova-based project.
    I tried to go to src-cordova folder and run ‘cordova prepare’ but get the same error.

    Then I tried to perform ‘quasar mode -a cordova’, but get error:
    app:mode-cordova Cordova support detected already. Aborting.

    So I had to run ‘quasar mode -r cordova’ and ‘quasar mode -a cordova’ after that quasar was able to build the project, but this workaround clears my config.xml, so this is not a solution for me.

    What I’m doing wrong?
    Please, help!

  • Admin

    Did you run “npm install” inside of /src-cordova which is a Cordova project folder on itself?

  • @rstoenescu thanks for quick response!

    I’ve just tried you solution but still get ‘CordovaError: Current working directory is not a Cordova-based project.’ when run ‘quasar dev -m cordova -T android’.

  • @NT Did you finnd a solution? I’m getting the same error.

  • You need to be careful when you remove a mode in quasar, because it will automatically remove assets that it generated for you via quasar-cli. I know this doesn’t really address the issue, but a temporary workaround might be something like this (in your CWD):

    $ cp -r src-cordova src-cordova-bak
    $ quasar mode -r cordova
    $ quasar mode -a cordova
    $ mv src-cordova-bak src-cordova

  • Admin

    @NT just create an empty “www” folder in your /src-cordova folder. The Cordova CLI looks for it in order to determine if the folder is a Cordova project or not.

Log in to reply