I have installed:
Xcode 10
Command Line Tools (macOS 10.14) for Xcode 10 Beta and Beta 2
macOS_SDK_headers_for_macOS_10.14.pkg using this:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
I have also opened Xcode 10 and waited for it to install components.
Brew still gives me the error:
Error: The Command Line Tools header package must be installed on Mojave.
The installer is located at:
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Here is brew config
$ brew config
HOMEBREW_VERSION: 1.6.12
ORIGIN: https://github.com/Homebrew/brew
HEAD: 0aab25bdb3bfa96d8eb14a38001ff6a24587bcdd
Last commit: 8 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: bde1292d5f98949e3f566b78c05e08bd30914afe
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.1 => /Applications/Xcode-beta.app/Contents/Developer/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.14-x86_64
CLT: 10.0.0.0.1.1527767617
CLT headers: N/A
Xcode: 10.0 => /Applications/Xcode-beta.app/Contents/Developer
XQuartz: 2.7.11 => /opt/X11
What should I do next to get Brew to work?
Same situation. Also just got an update through Software Update for Command Line Tools for Xcode 10 Beta 3.
I installed that and re-installed updated SDK headers and brew config now shows CLT headers, yeah!
Just got an update through Software Update for Command Line Tools for Xcode 10 Beta 3.
I installed that and re-installed SDK headers and it now works.
It's weird that it doesn't show up in https://developer.apple.com/download/more/
I had this same problem, after a restart the file appeared on /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
I opened and installed it. Now brew is working again.
I'm on Movaje 10.14.6 - This is what I did:
Uninstall Xcode
Install Xcode (11.2.1)
run xcode-select --install
run sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Related
I just got a new Macbook and did the migration from my old one. It looks like the homebrew executables have a bad CPU type and don't work. Things are a bit stuck right now and I'm not sure how to move forward.
Even my ls is mapped to lsd and I can't list files.
Do I have to manually uninstall brew and related executables by deletion and start over?
DISCLAIMER: I didn't test this myself.
If you don't want to alwasy use Rosetta2, you have to manually remove the Intel version of Homebrew, then install the M1 version.
You can save the list of your Intel installed package with:
brew list > myHomebrewPackages.txt
You will then have to reinstall them on the M1 version.
To remove the Intel version, download the uninstall script from the official Homebrew github repository. Make it executable with:
chmod +x uninstall.sh
and run it with:
./uninstall.sh --path=/usr/local
Then install the M1 version with:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The M1 version of Homebrew will be installed under /opt/homebrew.
How to fix this build failure in ios?
I'm using Xcode Version 9.2
Mac OS Sierra
What is RCTBaseTextInputView?
CompileC
/Users/bliss/Library/Developer/Xcode/DerivedData/RNJyotish-fjjxyvwbhqivjwbnwwqhmqzgfazq/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.o
/Users/bliss/Documents/Coder/ReactNative/RNCLI/BITBUCKET/rnjyotish/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m
normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
Each and Every version really matters. This may be done other way for another version. But for Mac High Sierra follow this:
My System:
High Sierra 10.13.3
XCode 9.4
Node 8.11.1
react-native-cli#2.0.1
watchman 4.9.0
react-native#57.8
android studio 3.6.3
Android Emulator: Pixel API 28 : Android Pie 9
Also Tested: Genymotion 3.1.0 : Samsung Galaxy S10 Android 10
Iphone Emulator 11.3
Xcode Build location Unique: xcode -> Preference->Locations -> Advanced
[If you do not installed nvm then uninstall node completely then install it through nvm. It is not required but highly recommended]
nvm install 8.11.1
THIS VERSION DOES NOT REQUIRE yarn. So I deleted yarn cause later version was making trouble for yarn,
You may try with yarn if it is already installed but for this build not required
brew uninstall yarn
brew install watchman
do not use npx rather you are going toward particular version
npm install -g react-native-cli#2.0.1
add react-native to .bash_profile:
export PATH="/Users/hasan/.nvm/versions/node/v8.11.1/bin/:$PATH"
*if you have used oracle java over version 8, uninstall that with the following:
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-11.jdk
Install openJDK8:
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
ALWAYS USE VERSION NUMBER. REACT NATIVE DOESN'T FIX ANYTHING MAGICALLY
react-native init RealmProject --version 0.57.8
Install android sdk:
http://reactnative.dev/docs/0.57/getting-started
Add the following to .bash_profile:
export ANDROID_HOME=/Users/hasan/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
After above complete successfully:
react-native run-android
react-native run-ios
if you had any error MAKE SURE you delete all caches:
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
up to this point there will be no problem but to make it more protected:
Change gradle-wrapper.properties 4.4 to 4.9 under Project>android>gradle>wrapper>gradle-wraper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
android>build.gradle plugin version change to 3.2.1
classpath 'com.android.tools.build:gradle:3.2.1'
Cheers and Happy Coding!
I am facing this error while creating bundle of react-native app.
I am executing command react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios
error SHA-1 for file /usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js (/usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js) is not computed. Run CLI with --verbose flag for more details.
ReferenceError: SHA-1 for file /usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js (/usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js) is not computed
at DependencyGraph.getSha1 (/usr/local/lib/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph.js:258:13)
at /usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:211:26
at Generator.next (<anonymous>)
at asyncGeneratorStep (/usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:46:24)
at _next (/usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:66:9)
at /usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:71:7
at new Promise (<anonymous>)
at /usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:63:12
at Transformer.transformFile (/usr/local/lib/node_modules/react-native/node_modules/metro/src/DeltaBundler/Transformer.js:236:7)
at /usr/local/lib/node_modules/react-native/node_modules/metro/src/Bundler.js:87:34
react-native info command output
info Fetching system and libraries information...
System:
OS: macOS Mojave 10.14.3
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU # 2.30GHz
Memory: 1.73 GB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 27.0.3, 28.0.3
System Images: android-29 | Google Play Intel x86 Atom
Android NDK: 20.1.5948944
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native: 0.61.5
To solve my issue I have run command with --force option.
npm install -i -g --force react-native-cli
This issue was raise due to configure old project with old react-native version. and then trying to run latest react-native ver with new Project.
install with npx
run
on windows 10
npx react-native run-android
on linux
npx react-native start
I resolved the issue in my Mac using
npx react-native start
For me, I installed the wrong package.
Instead of this:
npm i -g react-native
Make sure you do this:
npm i -g react-native-cli
I can't comment so use npm install -i -g --force react-native-cli as stated by Punita. It works when it comes to fixing the SHA-1 issue.
But please don't use sudo for any npm related things. thanks.
I think that's about version of react-native-cli.
You should try to update.
npm i -g react-native-cli
To solve my issue I have run command with --force option.
npm install -i -g --force react-native-cli
I would like to add that this same error happened to me (running on PC, Windows) when I tried to run the gradle command to build an Android release (./gradlew bundleRelease).
I found the cause of the issue was due to using Dropbox to sync the folder that this React Native project belonged to, using the Dropbox "Back up your PC automatically" feature, where I had my user Documents folder backed up by Dropbox. Essentially, I would get an error like this:
error SHA-1 for file C:\Users\Ted
Zhu\Documents\my-app\MyAppWin\index.js (C:\Users\Ted
Zhu\Dropbox\PC\Documents\my-app\MyAppWin\index.js)
is not computed. Run CLI with --verbose flag for more details.
ReferenceError: SHA-1 for file C:\Users\Ted
Zhu\Documents\my-app\MyAppWin\index.js (C:\Users\Ted
Zhu\Dropbox\PC\Documents\my-app\MyAppWin\index.js)
is not computed
I would notice in the error message, it referred to the same file (index.js) with two different paths:
C:\Users\Ted Zhu\Documents\my-app\MyAppWin\index.js
C:\Users\Ted
Zhu\Dropbox\PC\Documents\my-app\MyAppWin\index.js
This must've been because Dropbox created a symbolic link of the folder so that it would have a path within my Dropbox folder. This appears to cause the file in question to have two paths that refer to the same folder, and trick the Metro bundler into thinking that a SHA hash was not created for one of the project files.
The solution was to move this project to a different directory that is not backed up by Dropbox. In my case, I just created a new folder in my user home directory. Then I was able to successfully run the gradle command to build the Android app.
For me, I fixed it by install correct react-native-cli:
yarn global remove react-native-cli
yarn global add react-native-cli
For me, global cli update does not work.
I Just run the command like yarn react-native bundle...It works!
yarn react-native bundle --reset-cache --entry-file index.js --platform ios --bundle-output test.bundle --dev false
This worked for me:
npx react-native start
When Metro has started, open another Tab on the terminal, same directory then run:
npx react-native bundle ...
The problem for me was not using npx for the react-native command.
To solve I have run
npm install -i -g --force react-native-cli
I was not able to install any pod in my system.
Hence, I removed cocoapods from my Mac and then reinstalled it.
The process was successful but when I run the command pod init following error shows up in the terminal:
`verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:49:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
I also checked my Git version which was 1.8.4 but I am getting any solution to update the same.
It needs to set your command line tool version, in your Xcode (Preferences).
You can download latest command line tool from Apple Download Portal, if you have paid apple developer account/id.
Here are current stable and beta Xcode Tools and supporting command line tool download links. (Ensure you're logged in using premium developer account on Apple Developer Account to access these links)
Xcode 11
Xcode 11.2 beta 2
- (Command Line Tool (Xcode 11.2 beta 2) - for macOS 10.14)
Xcode 11
- (Command Line Tool (Xcode 11) - for macOS 10.14)
Xcode 10
Xcode 10.2.1
- (Command Line Tool (Xcode 10.2.1) - for macOS 10.14)
Xcode 10.2
- (Command Line Tool (Xcode 10.2) - for macOS 10.14)
Xcode 10.1
- (Command Line Tool (Xcode 10.1) - for macOS 10.14)
- (Command Line Tool (Xcode 10.1) - for macOS 10.13)
Xcode 10
- (Command Line Tool (Xcode 10) - for macOS 10.14)
- (Command Line Tool (Xcode 10) - for macOS 10.13)
Once you've latest command line tool installed in your system, set it from Xcode Menu.
(Xcode Menu Items) Xcode ► Preferences ► Location ► Command Line Tool ► Select appropriate command line tool
Firstly remove the existing git in your system using commands:-
Use command "which git"
that will give u the path say "/usr/local/bin/git", then use command->$ sudo rm -rf /usr/local/bin/git
This will remove existing git from your system
Then reinstall git again
$ brew install git
It might issue a warning saying
Warning: git 2.13.2 is already installed, it's just not linked.
You can use `brew link git` to link this version.
Then run below mentioned command:-
$ sudo chown -R $(whoami) /usr/local/share/
$ sudo chown -R $(whoami) /usr/local/lib
$ brew link --overwrite --dry-run git
It might give you error
Error: Could not symlink share/git-core/templates/description
Target /usr/local/share/git-core/templates/description
already exists. You may want to remove it:
rm '/usr/local/share/git-core/templates/description'
To force the link and overwrite all conflicting files:
brew link --overwrite git
To list all files that would be deleted:
brew link --overwrite --dry-run git
Then finally run command
$ brew link --overwrite git
This is how I updated my git and pod init worked. Hope you find it helpful :)
I had a similar issue after installing a second Xcode.
As a result there was no command line tools specified in xcode-select -p
Fixed by manually choosing newer Xcode version
I came across this answer after installing latest version of XCode 9.3 -
I was trying to do a -
Pod Update [ or --version, or any pod command ...]
I tried to "brew install git" like in the top answer but there was all kinds of complaints about no access to Cellar, then when I added access, missing c compilers ..
The command line tools setting in Locations in Xcode Preferences showed command latest 9.3 line tools installed "correctly", but after reading the above answers I decided to install it again using -
xcode-select --install
After the download / install, pod started working again, was still having issues with brew which was a high sierra issue. fixed with -
https://github.com/Homebrew/brew/issues/3285.
Run the command
$ brew install git
Then navigate to your project folder and type pod init
These steps worked for me
I am using charts library and trying to run the demo. Before running I have to install the dependencies using Carthage. I goto project folder location and type in terminal:
carthage update
I got the below error:-
Carthage requires git 2.3.0 or later.
How to install Carthage decencies and run the above said demo.
Select Command Line Tools to the latest version of Xcode.
Xcode -> Preferences -> Locations -> Command Line Tools
Open Preferences shortcut : Command + comma ⌘ + ,
It seems like you have used another Xcode version since last time. You should set command line tool again by running the following in terminal:
sudo xcode-select -s <path to Xcode>/Contents/Developer
for example:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Not sure if this will help, but I ran into the same issue and found out that xcodebuild is using a different Xcode that I installed.
so you can probably double check which Xcode you are using:
xcode-select --print-path
Here is the original post that helped me solving this issue:
Change Carthage Swift version
It seems you have to install new version of git.
brew install git
It could say "Target /usr/local/bin/git
already exists. You may want to remove it". I didn't want to remove it and decided only to overwrite:
brew link --overwrite git
It helped me with the same issue. I hope it will help to someone else.