Ingap.dev - A Personal Dev Blog

Dress for the job you want, not the job you have.

Published on Wednesday 11 January 2023

Tags: yarn1 reactjs4

[SOLVED] YARN create react app not working: the nearest package directory...

ERROR: the nearest package directory doesn't seem to be part of the project declared in [...]


Error

ERROR: the nearest package directory doesn’t seem to be part of the project declared in [...]

Solution

I solved by just deleting any other package.json in the path. E.g. my script was in /A/B/C/D but somehow a package.json was placed in /A/B, so by removing it the problem got solved.