3

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

feyyum
  • 102
  • 1
  • 9

3 Answers3

8

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 glob@7.2.0

  • Unbelievable. It forced me to install Glob. Thank you so much. I've been trying to figure it out all day. – feyyum May 14 '22 at 17:57
  • 1
    Glad to hear that. With new version of react-native glob comes with 7.2.2 and it is pretty new version. I think (hope) it will solved quickly and we will not have to do it again. – Enes Can Güneş May 14 '22 at 18:10
2

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!

0

You can install glob npm i glob

Its works for me.

Omkar
  • 89
  • 1
  • 4