I am trying to get application version in my react native app.
To get app version, I have written following code.
import { version } from './package.json';
console.log(version.appVersion);
But, It's throwing error like following
[eslint] Unable to resolve path to module './package.json'. [import/no-unresolved]
Any suggestions?
I have fixed is some syntax error in package.json Package.json data just check with https://jsonlint.com/ website wether it is valid json data or not.
I my case, There is one } symbol missed. So, Fixed. it.