Open deepakverma4 opened 3 years ago
3. cd ios && rm -rf ~/Library/Caches/CocoaPods Pods ~/Library/Developer/Xcode/DerivedData/*; pod deintegrate; pod setup; pod install --repo-update
This worked for me!
I was able to solve this issue on a new M1 Macbook Air by just installing watchman directly with ARM version of brew (the one at
/opt/homebrew/bin/brew
) and tweaking the file descriptor sizes.brew install watchman sudo launchctl limit maxfiles 16384 16384 && ulimit -n 16384
I didn't have to change anything else.
Tweaking the file descriptor sizes did work for me in react-native@0.74.5
on a Mac with Apple M2.
i had the same problem with my M1 and a React Native project i tried to build/archive in Xcode. i first had to
xcode-select --install
but it gave me an estimate of 120 hours so i downloaded it manually from apple. Afterwards i could finally dobrew install watchman
, still had the error while i was trying to build/archive in xcode. After some debugging i found out that Xcode still didnt recognize watchman because it wasnt in its path. (For debugging measures i went toTarget -> Build Phases -> Bundle React Native code and images
and added a linewatchman --version
to check if watchman was recognized) After finding out it didnt, i added to the first line the path to my homebrew.export PATH=/opt/homebrew/bin:$PATH
Then it finally worked :)
This finally worked for me too after so much struggling! You can set it in .xcode.env.local
if you don't want to edit your build files
export NODE_BINARY=... # useful to pin your node version too
export PATH=/opt/homebrew/bin:$PATH
我的 M1 和我嘗試在 Xcode 中建置/存檔的 React Native 專案也遇到了同樣的問題。 我首先不得不這樣做,
xcode-select --install
但它給了我估計 120 小時,所以我從蘋果手動下載了它。後來我終於可以做到了brew install watchman
,當我嘗試在 xcode 中建置/存檔時仍然遇到錯誤。經過一番調試後,我發現 Xcode 仍然無法識別 watchman,因為它不在其路徑中。 (為了調試措施,我Target -> Build Phases -> Bundle React Native code and images
添加了一行來watchman --version
檢查看守人是否被識別) 在發現它沒有被識別後,我在第一行添加了我的自製程序的路徑。export PATH=/opt/homebrew/bin:$PATH
然後終於成功了:)
this method worked for me !!!! thanks a lotttttt
For future readers: If you ran brew install watchman
after seeing this error, you also need to rm -rf node_modules && npm install
before it will take effect.
Works fine with me.
MacOS: 3.0.1. xCode: 14.1 react-native: 0.62.3 node: 14.19.0 watchman: 2022.12.19.00 Yesterday everything worked. Today it's impossible to create release build due to exact this issue. Nothing from this thread helped (even stupid things a-la "recreate project in another directory")
Did you try this? -- rm -rf node_modules && npm install
This works, thanks!
i'm facing below issue while generating archive in xcode
i'm on
2021.06.07.00
version of watchmanany idea how to fix this?