Expo keeps crashing with error message - dyld: Symbol not found: _FSEventStreamCreate Abort Trap 6 - react-native

Expo was working fine until I did an npm install native-base --save and it keeps crashing every time I try to start it. I'm on Mac and have am using my real mobile devices to view the changes in my project.
I've uninstalled the native-base but am not sure how to replace the missing files.
Refer to error message screenshot here

Managed to find a solution for now (thanks to #brentvatne).
I updated the packages, including node:
brew update
brew upgrade node
And when I started Expo, another error came up - EMFILE: too many open files, watch at FSEvent.FSWatcher._handle.onchange
The error is caused by Watchman, to which I resolved it with:
brew install watchman

Related

Expo-start: An unexpected error has occurred

I am setting up react-native and expo on my machine.
When i run expo start in my terminal i get a blank white screen with the text "An unexpected error has occurred" And also when i scan the QR code i get "Network response timed out".
I tried following all the steps on setting up my expo environment using the docs so i do not know where i went wrong and how to resolve it.
I even tried deleting and reinstalling expo-cli on my machine.
I am using linux and I have expo-cli#5.6.0 installed.
Found the solution! Apparently expo-cli v5.4.10 or greater versions has some issues with the web interface. Rolled back to 5.4.9 and DevTools work again now. This is the rollback command
npm install expo-cli#5.4.9 --location=global
For uninstalling the Previous CLi you can use
yarn global remove expo-cli
or
npm -g uninstall expo-cli --save
if you are using npm

Watchman Version Showing 0.0.0. Preventing npm start on React Native App

I am trying to develop a react native application on MacOS, but I have been running into issues with installing watchman onto the machine. I have been running the command brew install watchman and whenever I enter the command watchman version the output displays version: 0.0.0. However, directly after running the first installation command over again, I see Warning: watchman 2022.06.06.00 is already installed and up-to-date which is really confusing me.
I have tried various different troubleshooting techniques such as uninstalling and reinstalling watchman, instead of using brew I attempted using sudo port install watchman with MacPorts, removing the .watchmanconfig file and re-creating it, and lastly restarting my device, but none of these solutions have seemed to work for me.
Whenever, I open my react native project and run the command npm start, this is the output that I see,
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
...
watchmanResponse: {
error: 'std::__1::system_error: open: /Users/USER/Desktop/ReactNativeApp: Operation not permitted',
version: '0.0.0'
}
This error message ends the npm start and because of this, I am unable to run npm run ios and continue with the development of the application. If anyone happens to know of any fixes or has experienced this before I would appreciate it if you share how I can resolve it. Thank you.
We can resolved this when we put our project outside from those folder Desktop,Download and Document
then run
npm start
It will be work
thanks

Warning: Invalid version react-native#0.64.2 for expo sdkVersion 43.0.0. Use react-native#0.64.3

I am working on an expo project and everything is working fine, but I began to get a warning message when android is building as
Warning: Invalid version react-native#0.64.2 for expo sdkVersion 43.0.0. Use react-native#0.64.3
The app is still running fine but I don't how to fix this error yet and I want to know if it won't cause an issue later.
I have tried to run npx react-native upgrade 0.64.3 but it didn't work, I got this error
info Fetching diff between v0.64.2 and v0.64.3... error Fetch request
failed with status 404: 404: Not Found. error Failed to fetch diff for
react-native#0.64.3. Maybe it's not released yet?
changing the version of react-native manually in the package.json and run expo install worked for me
I use the expo doctor command it allows diagnose issues with the project.
I would recommend using the expo upgrade command. It upgrades the project packages and config for the given SDK version.
More to find here.
I just faced the same issue. Basically it's telling you should use a higher version of your react-native. I solved it just by updating it to the specified version.
npx react-native upgrade 0.64.3
More info here.
Cheers,
If as in my case one need a specific version of react-native, let's say older because some legacy dependencies in a particular project that for some reason can't be upgrade, then change the version in the package.json won't work.
What worked as the cli suggested is to use:
expo doctor --fix-dependencies
That installed the correct lower version of react-native
To find out actual problems run this command :
expo doctor
To solve all problems regarding package conflicts run this command:
expo doctor --fix-dependencies
Use sudo on Unix based OS if you have permission issue to run those commands.
To solve the error, I used the below command:
npm install react-native-clean-project --save-dev
It is a library that allows us to resolve conflicts.
This library is added to your dependencies.
This handles the problem and if it is not the case add this command:
react-native clean-project-auto

expo always returning me with "-bash: expo: command not found" everytime i go to set up a project, "expo init projectname". how do i resolve this?

have downloaded latest version of node.js on mac
terminal says ive downloaded latest version of expo cli
if i try to run my first project in terminal; expo init project name, am always met with the same error. -bash: expo: command not found.
when i check terminal to make sure that expo is installed, i am also met with: -bash: expo: command not found.
i have spent at least 3 days trying to resolve this problem.
any help towards this resolution would be greatly appreciated
How have you downloaded the Expo CLI? It may be important to note that if you don't install the package globally, like npm install -g expo-cli, it may not be properly executable.
[Additionally, One thing I've found when installing commands is that it can help to restart your terminal. Sometimes after you've installed something new, not everything will be in place, but it might be there when the terminal restarts.]

Failed to load bundle - Could not connect to development server

I've been looking for a solution to this issue for a day now but couldn't fix it.
I have not used react native for a month when everything was working fine.
Now, if I try to run an existing project that used to work (react native 0.59.5) or a brand new project (react native 0.59.9) with the iOS simulator on my mac, I get the error:
Failed to load bundle - Could not connect to development server
Any idea how I can fix this?
Ok found the issue. Was thinking it might be watchman related issue and wanted to use the command brew reinstall watchmanto reinstall it. By running this command, I found an error
Error: Xcode alone is not sufficient on Mojave. Install the Command Line Tools: xcode-select --install
Looks like the command line tools for xCode was not available anymore.
I launched the command xcode-select --install and then reinstalled watchman just in case. It is now working!
Couldn't connect to development server error
This error is received when the metro bundler isn't running in port 8081. To start the bundler, from project folder run:
npm start
Now, try reloading your app (ctrl + R for iOS / r+r for Android).
Also, check your terminal in case the project failed initial build due to some error.