Before anyone spends to much time debugging this problem, most of the time it can be resolved by deleting node_modules and reinstalling the packages.
If a lockfile exists you might use
yarn install --frozen-lockfile
respectivly. if not then