'reactive-native cli error creating new projects "Android project not found."
When I try to run a react native project with the command react-native run-android the following exception is a displayed:
"Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting
project.android.sourceDiroption to point to a new location."
The first two projects I created ran correctly, but since then every new project created displays the above exception when I try to run them in the emulator. Can someone help clarify why I am encountering this exception?
Solution 1:[1]
The issue comes after the glob package version 7.2.2 was released. Version 7.2.2 has allowWindowsEscape = true
options.allowWindowsEscape = false // This should be false
However, you can add the 7.2.0 version in package.json.
Follow the below steps to fix this:
- Delete node_modules
- add this to package.json "resolutions": { "glob": "7.2.0" }
- Reinstall node_modules with npm install
If this does not work try the below command
"npm i [email protected]"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kapil Lohakare |
