Skip to content
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

FBReactNativeSpec error after upgrade from 0.63.4 to 0.64.0 #138

Closed
ceyhunkeklik opened this issue Mar 13, 2021 · 177 comments
Closed

FBReactNativeSpec error after upgrade from 0.63.4 to 0.64.0 #138

ceyhunkeklik opened this issue Mar 13, 2021 · 177 comments

Comments

@ceyhunkeklik
Copy link

ceyhunkeklik commented Mar 13, 2021

Environment

System:
OS: macOS 11.2.3
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 1.27 GB / 16.00 GB
Shell: 5.8 - /usr/local/bin/zsh
Binaries:
Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v12.18.0/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v12.18.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 28, 29
Build Tools: 19.1.0, 20.0.0, 21.1.2, 22.0.1, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.2, 30.0.3
System Images: android-28 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_281 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Things I’ve done to figure out my issue

I used react-native cli to upgrade and the following page to manually changes.
https://react-native-community.github.io/upgrade-helper/?from=0.63.4&to=0.64.0

Upgrading version

0.64.0

Description

I've faced the following error when I want to start the IOS app with the "react-native run-ios" command. If I start the debug build from XCode, it is started successfully.

/bin/sh -c /Users/keklikc/Library/Developer/Xcode/DerivedData/DataroidMobile-gmjqxfphavicwkcccsennxqbhvuj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-0565B84ED1A643A94B66851B97B33BAC.sh
nvm is not compatible with the "npm_config_prefix" environment variable: currently set to "/Users/keklikc/.nvm/versions/node/v12.18.0"
Run unset npm_config_prefix to unset it.
/Users/keklikc/.zshrc: line 83: zstyle: command not found
/Users/keklikc/.zshrc: line 84: zstyle: command not found
/Users/keklikc/.zshrc: line 85: zstyle: command not found
/Users/keklikc/.oh-my-zsh/tools/check_for_upgrade.sh: line 32: syntax error near unexpected token )' /Users/keklikc/.oh-my-zsh/tools/check_for_upgrade.sh: line 32: () {'
/Users/keklikc/.oh-my-zsh/oh-my-zsh.sh: line 21: autoload: command not found
/Users/keklikc/.oh-my-zsh/oh-my-zsh.sh: line 39: syntax error near unexpected token (' /Users/keklikc/.oh-my-zsh/oh-my-zsh.sh: line 39: for plugin ($plugins); do'
/Users/keklikc/.zshrc: line 120: autoload: command not found
/Users/keklikc/.zshrc: line 129: add-zsh-hook: command not found
nvm is not compatible with the "npm_config_prefix" environment variable: currently set to "/Users/keklikc/.nvm/versions/node/v12.18.0"
Run unset npm_config_prefix to unset it.
Command PhaseScriptExecution failed with a nonzero exit code

warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-Glog' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'boost-for-react-native' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-PeerTalk' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'YogaKit' from project 'Pods')
warning: no rule to process file '/Users/keklikc/Projects/Dataroid-MobileApp/ios/Pods/Flipper-RSocket/rsocket/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/keklikc/Projects/Dataroid-MobileApp/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt' of type 'text' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/keklikc/Projects/Dataroid-MobileApp/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-DoubleConversion' from project 'Pods')

** BUILD FAILED **

The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/keklikc/Library/Developer/Xcode/DerivedData/DataroidMobile-gmjqxfphavicwkcccsennxqbhvuj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-0565B84ED1A643A94B66851B97B33BAC.sh
(1 failure)

Reproducible demo

Upgrade from 0.63.4 to 0.64.0 then execute react-native run-ios

@ceyhunkeklik ceyhunkeklik changed the title FBReactNativeSpec error after upgrade from 0.63.4 to 0.64 FBReactNativeSpec error after upgrade from 0.63.4 to 0.64.0 Mar 13, 2021
@ElForastero
Copy link

ElForastero commented Mar 13, 2021

Got the same thing trying to upgrade from 0.64.0-rc.3 to stable 0.64.0.

  • I cleared xcode build
  • watchman watch-del-all
  • yarn start --reset-cache
  • removed Pods & Podsfile.lock
  • removed node_modules
  • changed xcode build system to Legacy and back
  • rebooted laptop

Nothing helps.

Xcode 12.4
Big Sur
Intel
Node 15

@brandonpearcy
Copy link

I added unset PREFIX (probably unset npm_config_prefix for OP) to the top of node_modules/react-native/scripts/find-node.sh and that fixes the iOS build. If this works for you, try using patch-package to make this change sticky.

@N1colasVega
Copy link

N1colasVega commented Mar 15, 2021

after this trick i got this: CompileC /Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-btdlvrsshpcfmndosfollajacgcx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTVibration.build/Objects-normal/x86_64/RCTVibration.o /Users/pavelsytniakovskyi/Documents/React\ Native/AwesomeProject/node_modules/react-native/Libraries/Vibration/RCTVibration.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler

111041177-48b4cf00-83f4-11eb-89a6-9847e3f84259

also i noticed this

Screenshot 2021-03-15 at 14 24 20

So, still no answers?

@geraintwhite
Copy link

I added unset PREFIX (probably unset npm_config_prefix for OP) to the top of node_modules/react-native/scripts/find-node.sh and that fixes the iOS build. If this works for you, try using patch-package to make this change sticky.

I had the same issue on my build server but not my dev machine and adding unset npm_config_prefix with patch-package solves it.

@Aljishim1
Copy link

I have tried (unset npm_config_prefix) workaround but I am still getting this error and iOS build failed.

Trying to solve this issue with no luck.

@kristijantomic
Copy link

kristijantomic commented Mar 20, 2021

@brandonpearcy thank you for the patch, and could you please explain in plain simple english what unset PREFIX does?

@EHRdev
Copy link

EHRdev commented Mar 20, 2021

Got the same thing trying to upgrade from 0.64.0-rc.3 to stable 0.64.0.

  • I cleared xcode build
  • watchman watch-del-all
  • yarn start --reset-cache
  • removed Pods & Podsfile.lock
  • removed node_modules
  • changed xcode build system to Legacy and back
  • rebooted laptop

Nothing helps.

Xcode 12.4
Big Sur
Intel
Node 15

could you solve it?

@ElForastero
Copy link

could you solve it?

Unfortunately no :(

@hyochan
Copy link

hyochan commented Mar 21, 2021

What's more strange is that it works exactly the opposite in android. When react-native run-android, it works well but when built from android studio it can't find the js bundler (the build is ok).

@marudy
Copy link

marudy commented Mar 21, 2021

Same issue here, looks like it's connected with the issues we faced on the Road to v0.64 Discussion #214 issue:

Screenshot 2021-03-21 at 16 04 45

>>>>> Generating schema from flow types


/Users/tasosmaroudas/yolo/github/inside-labs/omni/node_modules/react-native-codegen/lib/parsers/flow/index.js:220
    const regex = new RegExp(TURBO_MODULE_REGISTRY_REQUIRE_REGEX_STRING, 'g');
                  ^

SyntaxError: Invalid regular expression: /TurboModuleRegistry\s*\.\s*get(Enforcing)?\s*<\s*Spec\s*>\s*\(\s*['"](?<nativeModuleName>[A-Za-z$_0-9]+)['"]\s*,?\s*\)/: Invalid group
    at new RegExp (<anonymous>)
    at buildSchema (/Users/tasosmaroudas/yolo/github/inside-labs/omni/node_modules/react-native-codegen/lib/parsers/flow/index.js:220:19)
    at Object.parseFile (/Users/tasosmaroudas/yolo/github/inside-labs/omni/node_modules/react-native-codegen/lib/parsers/flow/index.js:276:10)
    at files.reduce (/Users/tasosmaroudas/yolo/github/inside-labs/omni/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema.js:75:35)
    at Array.reduce (<anonymous>)
    at combineSchemas (/Users/tasosmaroudas/yolo/github/inside-labs/omni/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema.js:66:16)
    at Object.<anonymous> (/Users/tasosmaroudas/yolo/github/inside-labs/omni/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js:90:40)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
Command PhaseScriptExecution failed with a nonzero exit code

Libtool /Users/tasosmaroudas/Library/Developer/Xcode/DerivedData/omni-fevwfpyebixpcpdoffjgdtusphxs/Build/Products/Debug-iphonesimulator/RNFBMessaging/libRNFBMessaging.a normal (in target 'RNFBMessaging' from project 'Pods')
    cd /Users/tasosmaroudas/yolo/github/inside-labs/omni/ios/Pods
    export IPHONEOS_DEPLOYMENT_TARGET\=9.0
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk -L/Users/tasosmaroudas/Library/Developer/Xcode/DerivedData/omni-fevwfpyebixpcpdoffjgdtusphxs/Build/Products/Debug-iphonesimulator/RNFBMessaging -filelist /Users/tasosmaroudas/Library/Developer/Xcode/DerivedData/omni-fevwfpyebixpcpdoffjgdtusphxs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFBMessaging.build/Objects-normal/x86_64/RNFBMessaging.LinkFileList -dependency_info /Users/tasosmaroudas/Library/Developer/Xcode/DerivedData/omni-fevwfpyebixpcpdoffjgdtusphxs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFBMessaging.build/Objects-normal/x86_64/RNFBMessaging_libtool_dependency_info.dat -o /Users/tasosmaroudas/Library/Developer/Xcode/DerivedData/omni-fevwfpyebixpcpdoffjgdtusphxs/Build/Products/Debug-iphonesimulator/RNFBMessaging/libRNFBMessaging.a
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/tasosmaroudas/Library/Developer/Xcode/DerivedData/omni-fevwfpyebixpcpdoffjgdtusphxs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-B34018C2B1ECE620432B6A01A1CDBB2D.sh
(1 failure)

@smacgregor
Copy link

@marudy - the issue with TurboModulesRegistry is actually a different issue - I ran into it too:

#139

The error happens if you use the wrong version of node. Try making sure you are using node 12.0.

@parveen-bhatia
Copy link

Facing same issue. Tried using unset PREFIX or unset npm_config_prefix to the top of node_modules/react-native/scripts/find-node.sh but no luck.

@mikeportanova
Copy link

Hey all,

I got this issue as well, but before trying the monkey patch fix, I investigated my node and npm environment. Turns out I had a goofy environment (I think from installing node at one point with Homebrew, then from an installer, etc). I fixed my environment issues and this exact error disappeared. So, my advice is ensure your node environment is clean, your PATH is clean, etc.

@N1colasVega
Copy link

Hey all,

I got this issue as well, but before trying the monkey patch fix, I investigated my node and npm environment. Turns out I had a goofy environment (I think from installing node at one point with Homebrew, then from an installer, etc). I fixed my environment issues and this exact error disappeared. So, my advice is ensure your node environment is clean, your PATH is clean, etc.

i reinstalled whole environment, tried to do it through bash and zsh, have the same results

System:
OS: macOS 11.2.2
CPU: (8) x64 Apple M1
Memory: 82.81 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.16.0 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.11 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 28, 29, 30
Build Tools: 28.0.3, 29.0.0, 29.0.2, 30.0.2, 30.0.3
System Images: android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_242-release - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

@N1colasVega
Copy link

as turned out the problem was a space in the project path. Interesting that previous version wasn't be under this issue

@SpawnAtis
Copy link

I was able to resolve this problem with node by the following commands:

  1. brew uninstall yarn
  2. npm install --global yarn

@JB-CHAUVIN
Copy link

JB-CHAUVIN commented Mar 25, 2021

Same issue goes for me...

I have the following error when building with CLI or XCODE 12 :

Cycle in dependencies between targets 'XXX' and 'FBReactNativeSpec'; building could produce unreliable results.
Cycle path: XXX → FBReactNativeSpec → XXX
Cycle details:
→ Target 'XXX': CodeSign /Users/USER/Library/Developer/Xcode/DerivedData/XXX-gmygnlcxpxbgnjhbiucdcnkhkmfv/Build/Products/Debug-iphonesimulator/Docavenue.app
○ Target 'XXX': ProcessProductPackaging  /Users/USER/Library/Developer/Xcode/DerivedData/XXX-gmygnlcxpxbgnjhbiucdcnkhkmfv/Build/Intermediates.noindex/Docavenue.build/Debug-iphonesimulator/XXX.build/XXX.app.xcent
○ Target 'XXX' has target dependency on Target 'FBReactNativeSpec'
○ That command depends on command in Target 'FBReactNativeSpec': script phase “[CP-User] Generate Specs”
→ Target 'FBReactNativeSpec' has copy command from '/Users/USER/Maiia/Mobile/maiia-mobile-develop/node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h' to '/Users/USER/Library/Developer/Xcode/DerivedData/XXX-gmygnlcxpxbgnjhbiucdcnkhkmfv/Build/Products/Debug-iphonesimulator/FBReactNativeSpec/FBReactNativeSpec.framework/Headers/FBReactNativeSpec.h'
○ That command depends on command in Target 'FBReactNativeSpec': script phase “[CP-User] Generate Specs”

@mzu
Copy link

mzu commented Mar 25, 2021

In case anyone wants to try a temporary fix that worked for me: I ended up commenting all lines inside node_modules/react-native/scripts/find-node.sh. It seems as if my node environment didn't agree with this script. I could build and run my project on an actual device afterwards without any further issues.

@chadhobson
Copy link

I had this same error in our monorepo before having a "duh" moment and remembering I have to update the react-native dependency in all the package.json files to match.

Needless to say, React Native doesn't update often enough for me to remember this.

Anyway, this fIxed the issue for me so I'm just leaving this comment in the off chance it saves someone else some time.

@yajinn
Copy link

yajinn commented Mar 16, 2022

This must be a joke, because I used a space in the parent folder name and it got fixed when I remove

../React Native/project -> ../ReactNative/project

@emil-malmgaard-rasmussen

Interesting. Had same issue after upgrading from 0.66 to 0.67. Tried everything, deleting & re-installing pods, re-installing node modules, alias etc. The only think to have worked in my case was changing -e to +e in node_modules/react-native/scripts/find-node.sh

This fixed it for me when upgrading from .63 to .67, I think it might just be an issue to upgrading .67 in general

This did it for me, not sure if it is a permanent fix though??

Would it be smartest to add nvm or is that also a conditional fix?

@amirmohammadshamss
Copy link

I changed the node.js version, and It was corrected.

@mjmasn
Copy link

mjmasn commented Mar 31, 2022

Came across this issue after upgrading from 0.66.4 to 0.67.1.


First thing is to make sure react-native-codegen is installed. npm i -D react-native-codegen or yarn add --dev react-native-codegen


Secondly if the script still fails, changing -e to +e works but really this is just hiding the issue.

It looks like the line

[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"

in find-node.sh will always have a non-zero return code (at least in our case, NVM_DIR must already be defined) so this is triggering the script to exit early due to the -e flag.

A more robust solution is to change that line to:

if [[ -z "$NVM_DIR" ]]; then
  export NVM_DIR="$HOME/.nvm"
fi

that way the script will still exit on any genuine errors.

EDIT: This started failing again, this time seemingly in the actual ~/.nvm/nvm.sh script rather than in find-node.sh. I only have node via nvm so can't use the suggestion from @kulor below. I've gone back to the +e change instead which seems to work enough for the build process to locate node.

@kulor
Copy link

kulor commented Apr 1, 2022

My fix, for now, is to clear the script. Not proud of it but progress over perfection when you're unblocking the build. Didn't like the idea of removing nvm or changing the desired version.

echo '' > node_modules/react-native/scripts/find-node.sh

@ceyhunkeklik
Copy link
Author

I think this issue has many solutions to fix it. Therefore, I closing it.

@ksealey
Copy link

ksealey commented May 15, 2022

Recently ran into this issue. Downgrading npm to version 16.x worked for me. I use nvm, so nvm use 16 and voila.

@kiki-le-singe
Copy link

kiki-le-singe commented May 30, 2022

Hello,

I come back 😅

My precedent comment is here #138 (comment) ... But now it doesn't work anymore 😏

But I fix the issue like that, I just comment these lines in node_modules/react-native/scripts/find-node.sh file:

# Define NVM_DIR and source the nvm.sh setup script
# [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"

# if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
#   . "$HOME/.nvm/nvm.sh"
# elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
#   . "$(brew --prefix nvm)/nvm.sh"
# fi

I think there is a problem with my nvm config so I use my node version from brew.

I hope it helps someone

@iasimk
Copy link

iasimk commented Jun 15, 2022

This must be a joke, because I used a space in the parent folder name and it got fixed when I remove

../React Native/project -> ../ReactNative/project

Worked for me 👯

@dipakksharma
Copy link

After two days of trying i found the solution in deleting spaces in the path where your project lives and run. But in order for this to work properly follow these steps:

  • If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues (i.e. npm uninstall -g react-native-cli)
  • Move the project folder in a path with no spaces (i.e. ~/sub folder name/ReactNativeApp won't work till you have spaces in the path, so move in a path like ~/folder/ReactNativeApp)
  • Then cd into the project folder and upgrade react native to the latest version with npx react-native upgrade and resolve conflicts if any
  • After upgrading remove the node_modules folder and the yarn.lock from the root and the podfile.lock and Pods folder from ios subfolder
  • Then cd back to the root and run yarn install && npx pod-install

Now run again your app in Xcode or your IDE and it works

Crazy and absurd that a space in the path-name could cause this issue

It's really working for me,
Thank you so much !!! 😊

@Danny7fold
Copy link

I'm currently facing this issue mac os 12.5 xcode 13

@Danny7fold
Copy link

library not found for -lFBReactNativeSpec

@ruhg12
Copy link

ruhg12 commented Aug 20, 2022

After two days of trying i found the solution in deleting spaces in the path where your project lives and run. But in order for this to work properly follow these steps:

  • If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues (i.e. npm uninstall -g react-native-cli)
  • Move the project folder in a path with no spaces (i.e. ~/sub folder name/ReactNativeApp won't work till you have spaces in the path, so move in a path like ~/folder/ReactNativeApp)
  • Then cd into the project folder and upgrade react native to the latest version with npx react-native upgrade and resolve conflicts if any
  • After upgrading remove the node_modules folder and the yarn.lock from the root and the podfile.lock and Pods folder from ios subfolder
  • Then cd back to the root and run yarn install && npx pod-install

Now run again your app in Xcode or your IDE and it works

Crazy and absurd that a space in the path-name could cause this issue

It's really working for me,
Thank you so much !!! 😊

@jfaq89
Copy link

jfaq89 commented Aug 23, 2022

Anyone else experiencing this on 0.69.4 ?

@KiranLogiticiks
Copy link

This must be a joke, because I used a space in the parent folder name and it got fixed when I remove
../React Native/project -> ../ReactNative/project

Also worked for me too. My project was in folder with name "React Native" now I changed to "ReactNative". Now the error disappear. Thank you........

@pke
Copy link

pke commented Nov 3, 2022

Still running into this when trying to patch a couple of react-native 0.66.3 files with yarn patch-package react-native.
None of the solutions here worked.

@lukeirvin
Copy link

I've made a brand new project, running on react-native version 0.70.4 and I'm getting the RBReactNativeSpec error when trying to build to a device.

@dennismunene
Copy link

Setting the default alias for nvm to my current node version did the trick for me.

  1. Check current version of node currently in use by running nvm current (Mine was 'system')
  2. Set it as default alias nvm set alias default system

@southxzx
Copy link

This must be a joke, because I used a space in the parent folder name and it got fixed when I remove

../React Native/project -> ../ReactNative/project

Why does it take me so long to find this comment LOL. It's exactly my case

@kamalmalaklife
Copy link

I had the same issue,
apparently, there was an update to xcode while the simulator is running so it was not updated to the latest iOS, while xcode was trying to build the project with latest params for latest simulator who was not updated.
I forced close the simulator and re-run, everything worked fine.

@oliver-platt
Copy link

Still having this issue with React 71.5. It builds locally but I can't get it run in the CI. Have tried all of the above! Driving me crazy. Anyone else still struggling with this or has another solution?

Thanks!

@nirmal98kumar
Copy link

This must be a joke, because I used a space in the parent folder name and it got fixed when I remove

../React Native/project -> ../ReactNative/project

Cannot thank you enough , such a silly thing . I almost used same parent folder name

@Deryan98
Copy link

I had the same issue FBReactNativeSpec failing on making the build. My specific case was that neither an init AwesomeProject to run a helloworld was lifting the ios project.
Solved this checking the path with pwd command
/Users/myuser/React Native/AwesomeProject
my path included a folder with a space "React Native"
just had to delete that space to set the path as follows:
/Users/myuser/ReactNative/AwesomeProject
then do all the stuff to lift ios
in your RN project run

rm -rf node_modules yarn.lock package-lock.json ios/Podfile.lock ios/Pods && 
yarn && cd ios && pod install && cd ..

then open your Awesome.xcodeproj located on ios folder with Xcode
run Product > Clean build folder
then Product > build

@MariuzM
Copy link

MariuzM commented Jul 3, 2023

I had the same issue FBReactNativeSpec failing on making the build. My specific case was that neither an init AwesomeProject to run a helloworld was lifting the ios project. Solved this checking the path with pwd command /Users/myuser/React Native/AwesomeProject my path included a folder with a space "React Native" just had to delete that space to set the path as follows: /Users/myuser/ReactNative/AwesomeProject then do all the stuff to lift ios in your RN project run

rm -rf node_modules yarn.lock package-lock.json ios/Podfile.lock ios/Pods && 
yarn && cd ios && pod install && cd ..

then open your Awesome.xcodeproj located on ios folder with Xcode run Product > Clean build folder then Product > build

This worked for me just dont have any spaces in your parent folder names

@caesaragen
Copy link

This must be a joke, because I used a space in the parent folder name and it got fixed when I remove

../React Native/project -> ../ReactNative/project

yep this worked for me, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests