Metro bundler Error When I run expo start - react-native

I am working on a react native expo project. I was running expo start with no problem until I updated my MacBook. Now, I am facing this error:
Could not get status from Metro bundler. Connect ECONNREFUSED 127.0.0.1:19003
Connecting to Metro bundler failed.
My expo diagnostics is as below:
Expo CLI 3.22.3 environment info:
System:
OS: macOS 10.15.5
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.3 - /usr/local/bin/node
npm: 6.14.6 - /usr/local/bin/npm
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6200805
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
npmPackages:
expo: ^38.0.0 => 38.0.8
react: 16.11.0 => 16.11.0
react-dom: 16.11.0 => 16.11.0
react-native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz =>
0.62.2
react-native-web: ~0.11.7 => 0.11.7
npmGlobalPackages:
expo-cli: 3.22.3

Ciao, according to this github page, you can:
Restart your computer
Run rm -rf .expo
Instead, according to Expo forum you can try to launch expo start with -c like expo start -c

Related

"Error: ENOENT: no such file or directory", when using React Native with Hermes

Whenever there is an error in my code while running expo with Hermes locally, I get this error message as well:
Error: ENOENT: no such file or directory, open 'C:\Users\kudo\01_Work\Repos\expo\expo\android\versioned-react-native\ReactAndroid\hermes-engine\.cxx\MinSizeRel\6d3b5k69\x86\lib\InternalBytecode\InternalBytecode.js'
Now if I fix the code error, for instance a missing bracket, the aforementioned error also disappears and everything works. However, this error appears no matter what error is in my code, and it's quite lengthy and is preventing me from debugging. If I remove Hermes, the error also disappears, but I would like to use Hermes.
Here is my env info:
expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.19044
Binaries:
Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.1.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: AI-212.5712.43.2112.8609683
npmPackages:
expo: ^46.0.0 => 46.0.15
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
react-native: 0.69.6 => 0.69.6
react-native-web: ~0.18.7 => 0.18.9
Expo Workflow: managed
Things I've tried:
rm -rf node_modules
npm cache clean --force
Deleting the metro_cache folder in appdata
npx expo start --clear
I expected the error to no longer appear, however the aforementioned steps did nothing at all.

Error: ENOENT: no such file or directory, open 'fs.js

I am working in React Native using expo-cli.
All I did till now is
expo init myapp
And after adding a text to my app.js file, I tried to do
npm start
which gave me this error
Error: ENOENT: no such file or directory, open 'fs.js
I have not used anything related to fs.js and as far as I can see from the errors page, the error is in
.../node_modules/metro/src/Server.js:99:24)
And other file stack system is referring it to metro.
I am using VS code and Linux Mint for development. My expo version is: 4.3.0
The result of expo diagnostics
Expo CLI 4.3.0 environment info:
System:
OS: Linux 5.4 Linux Mint 20.1 (Ulyssa)
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 10.19.0 - /usr/bin/node
npm: 6.14.4 - /usr/bin/npm
npmPackages:
expo: ~40.0.0 => 40.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
npmGlobalPackages:
expo-cli: 4.3.0
Expo Workflow: managed
try to start as an administrator with sudo yarn start
I managed to solve it here but I'm not sure what caused this problem.
first i restarted the computer, when i did this another error similar to this one appeared
How can i make this working. I tried giving sudo permissoins
so I ran
chmod -R 0777 / tmp
But it didn't work. so I deleted the node module and ran
sudo yarn install
yarn start --reset-cache
And the problem was solved

How to solve 'Authentication with Apple Developer Portal failed!'?

When I tried
expo build:ios
I got an error
Permission denied # rb_sysopen - /tmp/spaceship1592360646_8184_70175802335700.log
Authentication with Apple Developer Portal failed!
Reason: Unknown reason, raw: "Could not receive latest API key from App Store Connect, this might be a server issue."
Error: Reason: Unknown reason, raw: "Could not receive latest API key from App Store Connect, this might be a server issue."
at runAction (/Users/user_name/.config/yarn/global/node_modules/expo-cli/src/appleApi/fastlane.ts:28:17)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at authenticate (/Users/user_name/.config/yarn/global/node_modules/expo-cli/src/appleApi/authenticate.ts:47:40)
at Context.ensureAppleCtx (/Users/user_name/.config/yarn/global/node_modules/expo-cli/src/credentials/context.ts:63:24)
at IOSBuilder.bestEffortAppleCtx (/Users/user_name/.config/yarn/global/node_modules/expo-cli/src/commands/build/ios/IOSBuilder.ts:112:14)
at IOSBuilder.prepareCredentials (/Users/user_name/.config/yarn/global/node_modules/expo-cli/src/commands/build/ios/IOSBuilder.ts:137:5)
at IOSBuilder.run (/Users/user_name/.config/yarn/global/node_modules/expo-cli/src/commands/build/ios/IOSBuilder.ts:57:7)
at IOSBuilder.command (/Users/user_name/.config/yarn/global/node_modules/expo-cli/src/commands/build/BaseBuilder.ts:27:7)
at Command.<anonymous> (/Users/user_name/.config/yarn/global/node_modules/expo-cli/src/exp.ts:80:7)
diagnostics
Expo CLI 3.21.5 environment info:
System:
OS: macOS 10.15.5
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.18.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
expo: ^37.0.0 => 37.0.11
react: 16.9.0 => 16.9.0
react-dom: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
react-native-web: ^0.11.7 => 0.11.7
react-navigation: ^4.3.4 => 4.3.4
My expo version is the latest and two factor authentication is enabled.
I would appreciate it if you could give me any advice.

There are no Libraries linked in iOS project of react-native

I have tried to create a new project in react-native, After creating when I have opened the iOS project, in libraries folder I could not any libraries and i am not able to run the iOS Project.
I have tried react-native run-ios
Got error like "error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening AppName.xcodeproj."
Steps To Reproduce
Lis
cd AppName
open ios/AppName.xcodeproj inxcode and build.
react-native init AppName
I have tried to create multiple projects, but still no luck of getting libraries
react-native info logs
System:
OS: macOS 10.14.5
Binaries:
Node: 11.3.0 - /usr/local/bin/node
Yarn: 1.5.1 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1
I have fixed the issue, by searching over SO and found a solution
In React-native 0.60 +, you need to install pods
Step1: cd ios
Step2: pod install
Step3: pod update
After completion you can run.

Failed to call function, _fbBatchedBridge is undefined[react-native][linux][android]

I have a problem, while running a react native application on an android device, my application works perfectly but when i debug it remotely, it shows this error.
I have a second terminal running with react-native start(also tried with npm start) a new chrome tab also gets open in my browser but it shows that error is related to debuggerWorker.js.
I cant understand whats happening, any help will be highly appreciated!!!
Environment: OS: Linux 4.15 Node: 10.0.0 Yarn: Not Found npm: 6.0.0 Watchman: 4.7.0Xcode: N/A Android Studio: 3.1 AI-173.4819257 Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 =>