-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: str.replace is not a function #1883
Comments
try this, it helped me - https://stackoverflow.com/a/68579858/2005679 |
I already have Command Line Tools selected. Just in case I re-select it again, but it didn't work. |
Same issue here |
hi, did you find solution to this problem? i have tried doing the command line tools thing but it's not working for me and this error is occurring after creating new project. Are you using js or ts as before i had created a project in TS and it was working fine. The issue is with iOS device only as it works fine in android devices |
looks like it throws an error because it cannot run In my opinion failing to read the project configuration should not prevent user from running an app. I'll prepare a fix that will only warn user about it and skip the check if configuration cannot be read |
Hi, running the app with sudo allows it to properly read the xcodeproj file. It seems that it was a permission issue. |
Thanks @JosueOlivero your reference saved me as well, I was mad for a couple of days then I found this solution that fixed the issue like magic 😳Stay blessed!! |
sudo xcode-select --switch /Applications/Xcode.app |
Switching Xcode using Instead, this started happening for me after the xcode command line tools were updated through a software update. When I launched Xcode, it prompted me to accept an updated license agreement for the command line tools. After accepting the agreement the error went away. Hope this is useful to others running into this error. |
If anyone else is still having problems, for some reason I had two projects in my ios folder and I had to remove the wrong one. The output of |
In my case issue is caused by accidentally writing a few characters in the project.pbxproj file within my ios folder of the project. This results in the str.replace is not a function error. To resolve this problem, you can follow these steps: Open the project.pbxproj file located in the ios folder. |
This fixed mine |
Make sure you have run |
I ran this:
|
Environment
System:
OS: macOS 13.2.1
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 116.00 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.17.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 6.14.13 - /usr/local/bin/npm
Watchman: 2023.03.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.12.0 - /Users/jolivero/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 18.0.1.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: ^10.2.1 => 10.2.1
react: ^18.2.0 => 18.2.0
react-native: ^0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Description
Hello there,
I'm trying a new app, and I got this error.
Any idea?
Thanks!
The text was updated successfully, but these errors were encountered: