react-scripts use wrong directory

Jakub T. Jankiewicz
2023-03-04T13:57:57Z

### Describe the bug

I'm trying to install this application created with create-react-app inside another Node project:

https://github.com/themesberg/volt-react-dashboard

when installing the dependencies with yarn. I got this error when running `yarn start`:

```
kuba@jcubic:[~/projects/jcubic/quizerach/admin] (master)$ yarn start
yarn run v1.22.19
$ react-scripts start

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

"eslint": "^6.6.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:

/home/kuba/projects/jcubic/koduj/akademia/quiz/node_modules/eslint (version: 8.35.0)
```

`projects/jcubic/quizerach` is symlink to `/home/kuba/projects/jcubic/koduj/akademia/quiz`

### Did you try recovering your dependencies?

(Write your answer here.)

### Which terms did you search for in User Guide?

(Write your answer here if relevant.)

### Environment

(paste the output of the command here.)

### Steps to reproduce

(Write your steps here:)

1. Create NPM project (you can sue yarn) install ESLint
2. Clone CRA application (like this one https://github.com/themesberg/volt-react-dashboard) into directory inside you app
3. Run `yarn && yarn start` from that new directory

### Expected behavior

The start of the application

### Actual behavior

Error from React-scripts

![react-app](/uploads/a0cc2fc663d0af6500f9fa657bc02a84/222906239-b144eadf-e2e9-4347-980e-e4caed1e8406.png)

### Reproducible demo

```bash
git clone https://github.com/jcubic/cra-bug.git
cd cra-bug
yarn
cd volt-react-dashboard
yarn
yarn start
```