Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Using AppVersion with React

$
0
0

I’m trying to get the version of my app.

There is AppVersion here:
https://ionicframework.com/docs/native/app-version/?_gl=1*14qw14g*_ga*MTg0OTg4NTM3OS4xNjM4NzEzMTM5*_ga_REH9TJF6KF*MTY2MTcyOTI0MC4xNTkuMS4xNjYxNzMwMTA0LjAuMC4w

I did the install instructions there. Then tried to make it work in my Ionic App by

import {AppVersion} from '@awesome-cordova-plugins/app-version'

Then I tried to do a console.log like this:

console.log(AppVersion.getVersionNumber())

and it doesn’t work. Wish there was more documentation on React stuff. The error I get is the following:

./node_modules/@awesome-cordova-plugins/app-version/index.js
Module not found: Can't resolve '@awesome-cordova-plugins/core' in '/home/petem/ionic_apps/my_app/node_modules/@awesome-cordova-plugins/app-version'

Here is my Ionic Info:

Ionic:

   Ionic CLI       : 6.16.3 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 6.1.10

Capacitor:

   Capacitor CLI      : 3.1.1
   @capacitor/android : 3.2.0
   @capacitor/core    : 3.1.1
   @capacitor/ios     : 3.4.0

Utility:

   cordova-res                          : 0.15.4
   native-run (update available: 1.6.0) : 1.4.0

System:

   NodeJS : v14.17.0 (/usr/local/bin/node)
   npm    : 6.14.13
   OS     : Linux 5.14

edit: I have since ran npm install @awesome-cordova-plugins/core --save

Now my error is:

./node_modules/@awesome-cordova-plugins/core/decorators/common.js
Module not found: Can't resolve 'rxjs' in '/home/petemo/ionic_apps/my_app/node_modules/@awesome-cordova-plugins/core/decorators'


./node_modules/@awesome-cordova-plugins/core/decorators/cordova-function-override.js
Module not found: Can't resolve 'rxjs' in '/home/petemo/ionic_apps/my_app/node_modules/@awesome-cordova-plugins/core/decorators'

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>