Home > Software design >  React Native Android Project Not Found
React Native Android Project Not Found

Time:05-15

I am getting this error.

error 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.sourceDir` option to point to a new location.
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

There is no solution on this link.

  "dependencies": {
    "react": "17.0.2",
    "react-native": "0.68.2"
  }
```
Package.json file

CodePudding user response:

Hi i have solved with 3 steps.

  1. Clear node_modules

  2. add this to package.json

    "resolutions": {
    "glob": "7.2.0" }
    
  3. And reinstall with npm install

If this is not work please install glob with npm i [email protected]

CodePudding user response:

you can fix it without reinstalling, just go into the node_modules folder, find glob, and open the common.js file. in line 114 you will find options.allowWindowsEscape = true, change it to false and it will work perfectly!

  • Related