Back to Cordova

2021 08 05

slack-digest/2021-08-05.md

latest3.6 KB
Original Source

Cordova Slack Digest

Thu, 05 Aug 2021 08:25:32 GMT

User count: 4575

Join the conversation at slack.cordova.io

Channel #random (1 messages)


Thu, 05 Aug 2021 04:42:59 GMT

@alayande-mustapha says

Cloud computing is a career of the future ie, there so many evolving opportunities in the cloud industry.

The demand for Cloud roles are increasing.

As more and more businesses are becoming digital.

Cloud is taking over everything

So the aim is to create a learning community that inspires knowledge, practice, skills and accomplishments.

But first you have to show some level of interest, commitment and determination.

Start here

⬇️ ⬇️ ⬇️

http://bit.ly/whizlabcloud|http://bit.ly/whizlabcloud

Channel #general (10 messages)


Wed, 04 Aug 2021 13:24:22 GMT

@janek.beicher says

Hey! I'm currently trying to upgrade to cordova-android v10 and did so via Ionic-Cli. Upgrading and everything worked fine, I did it via

cordova
cordova platform add [email protected]```
new cordova version is added in package.json etc. But if I delete the `platforms` and `plugins` and run `ionic cordova platform add android`    (Which would be done in CI) it  tries to install an old version of cordova android:
```> cordova platform add android
Using cordova-fetch for cordova-android@^9.0.0```
I tried already to reinstall cordova (10.0.0) and also to update to latest ionic cli but the issue seems to be cordova? Also running `cordova platforms list` seems to result in outdated info:
```Available platforms: 
  android ^9.0.0
  browser ^6.0.0
  electron ^1.0.0
  ios ^6.1.0
  osx ^6.0.0```
any suggestions how to fix this? 🙏

Wed, 04 Aug 2021 13:26:07 GMT

@norman137 says

If you don't specify a version, it will use a pre-configured default major, which for cordova cli v10, it's cordova-android@^9.

Wed, 04 Aug 2021 13:29:54 GMT

@janek.beicher says

Alright! So there is no way to make sure via config that ci and colleagues are using the correct version? Also what's the purpose of adding it to package.json then? Do you think this would make a valid feature request? then I'd open one

Wed, 04 Aug 2021 13:32:46 GMT

@norman137 says

With older cordova CLI versions, pinning used to be done via config.xml using the <engine> tag... which might still work (not sure tbh)

Newer CLI versions relies more on NPM to manage those details. By doing cordova platform remove android behind-the-scenes does a npm uninstall which by default removes the entry from package.json, effectively removing your version pin. This may be an oversight.

I think the platform command does expose a --no-save flag, so you could also try cordova platform remove android --no-save

Wed, 04 Aug 2021 13:35:43 GMT

@norman137 says

eh -- just tested it, the --no-save flag stil seems to remove it from package.json

Wed, 04 Aug 2021 13:37:04 GMT

@janek.beicher says

But the pinning via engine tag works 🙌

Wed, 04 Aug 2021 13:37:16 GMT

@norman137 says

Was just about to say that

Wed, 04 Aug 2021 13:37:57 GMT

@janek.beicher says

I think that might me enough for now, thanks a lot for the quick help!

Wed, 04 Aug 2021 13:38:03 GMT

@norman137 says

You're welcome

Wed, 04 Aug 2021 14:22:17 GMT

@erisu says

Can’t guarantee the engine tag will remain for ever since we been moving these dependencies to package.json . It might be removed in the future.