I tried different ways to solve this error using various approaches. In this case, you can’t downgrade your code version because it is not compatible with the latest macOS.
I tried removing node_modules and reinstalling them, installing pods, restarting the laptop, and upgrading all package managers like CocoaPods. I also created new projects and tried everything, but nothing worked.
How can I solve this?
To resolve this, simply remove any spaces in your project folder and the parent folder. Spaces in folder names can cause issues with various tools and scripts, leading to errors. Renaming these folders to remove spaces can help avoid such problems.