The White Rabbit

If you don't get the requirements right, it doesn't matter how well you do anything else. (Karl Wiegers)

Published on Wednesday, 11 January 2023

Tags: yarn1 react1

[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.