If you get any error in installing the dependencies (e.g. npm ERR! Invalid version: “x.x” ) Please follow the below steps:
1. Delete “node_modules” folder (root directory) if it is there.
2. Delete “package-lock.json” file (root directory).
3. Check the value of “version” in your app.json & package.json file. If they are different, please make them same. And make it like 1.0.0 (three part) See the versioning rules.
4. Now run “npm install” command. If it gives any error, run “npm install –legacy-peer-deps” .