app is not building recently it working properly but as i add other package it stop - react-native

**app is not building recently it working properly but as I add other package it stop **

https://github.com/facebook/react-native/issues/35210
I had the same issue yesterday. The issue is not related to any new library installation directly although I had the same assumption initially.
Upgrade react-native version to the relevant patch number mentioned in the Github issue which I believe in your case it would be 0.70.5

Related

Output: "[Warning] Could not find workspace while activating"

I'm getting this error when opening VS Code. Does anyone know what it means? I've done some research but didn't get any relevant information :(
I've tried creating a workflow to see if the error disappeared, but it didn't.
It seems that react native is asking for a workspace to start but is it asking that in the first place? Can I disable react native from running when opening VS Code?
The folder opened when the screenshot above was taken was the folder it opens by default, I believe it's the mac "home" personal folder, and I have a folder called "git" inside of it, with all projects.
Given the date of this posting (2023-02-07), you're probably on version 1.10.0 of the extension. This sounds like this bug report in the microsoft/vscode-react-native GitHub repo: [Bug] Extension activating when it shouldn't #1891.
A fix is coming in version 1.10.1.
But it is taking some time and has not been release yet at the time of this writing 2023-01-31:
we're facing some problems in the last release process, recently we're waiting for new publishing PAT access to republish 1.10.1 again, maybe it will publish on marketplace on next week. We have nightly version for extension in marketplace as well, maybe you can use it now.
For now, you can try installing the nightly version.
Also, note from the extension's readme documentation:
Before going any further make sure that you:
have a working React Native environment.
have the emulator utility available in your PATH if you're developing Android applications.
[...]
Got it, this annoying log came from React Native Tools extension. They specify the requirements in the docs:
In my case, I don't have a specific React Native environment or the emulator PATH is not right.

How to Upgrade React Native Version 0.66.3 to 0.70.6?

Currently, my project running on the 0.66.3 version I need to upgrade to react native version 0.70.6. So I have used to following command
npx react-native upgrade
After running this command showing some error I have attached a screenshot please refer.
I am also trying the manual way using react native helper but some files are not available in my project.
so anyone please tell me how I will upgrade my project version?
After Run npx react-native run-android my build was created successfully but 3 errors showing in the metro bundler. I have attached a screenshot of the metro bundler error.
you can specify a React Native version and pass it as an argument:
npx react-native upgrade 0.70.6
you can also refer this official documentation for this
& it will also helps you if you got any error.
https://reactnative.dev/docs/upgrading
I found by changing react-native - index.js and react-native/Libraries/Text - index.js
Follow this link for output:
https://github.com/facebook/react-native/commit/3f629049ba9773793978cf9093c7a71af15e3e8d
Don't know whether it is the right way or not....
Since upgrading an application can break functionality in your app if you do not know what is needed to be changed. the upgrade is tells you to visit the pages to go through and see what has changed throughout the upgrading process.
Other as that I am just needing more information regarding to what is not working. Since upgrading is more as just running a command, its about reading the documentation and see what part is missing and what they replaced the files with. The missing files could be straight-out deprecated and not working with the new version.
As always check the debugger and read every message throughout and visit all links given and see the documentation regarding the upgrade differences, find out if there are any log files you could look at, and talk with people in your company / group of react-native about this.
"Some files are not available in my project"
This part might just be able to google and see if this is still supported or not in the version it could be phased out, or not supported in the version. that's where versioning comes in to play.
I am unsure what files and which libraries are deprecated based on your Opening Post, this needs more information, to help us, help you.

Unable to resolve module `#babel/runtime/helpers/interopRequireDefault` in recent versions of React Native

I am trying to upgrade an old React Native app version (v.55) to the latest (v.61). I started this process by running react-native init [project name]. I then copied only my JavaScript files into the new project. I then try to build, it tells me I am missing a module, I install the module, repeat.
However there is one issue that I can not seem to solve:
error: bundling failed: Error: Unable to resolve module `#babel/runtime/helpers/interopRequireDefault` from `../javascript_shared/HomeScreen.js`: #babel/runtime/helpers/interopRequireDefault could not be found within the project.
I am running
react: 16.9.0
react-native: 0.61.5
#babel/core: 7.7.4
#babel/runtime: 7.7.4
I have searched and searched, all coming up with the same answer: Downgrade #babel/runtime to version 7.0.0-beta.55 due to some change being made after that version. This, however, changes nothing (not to mention I would prefer not to revert to such an old version). I have cleared every cache and whatnot but still the same issue remains.
If I look in node_modules/#babel/runtime/helpers I do see a interopRequireDefault.js.
There seem to be no forum posts of people having this issue with these recent versions anywhere.
I (sort of) figured it out.
I had a folder with JavaScript in it one level up (../javascript_shared/) and something in the build process did not like that. I had watchFolders in metro.config.js but apparently that was not enough.
I just moved this folder into the project root (where my package.json and index.js are).
Although this is not a proper solution I hope this helps someone. Maybe it will give that person the next place to look.

Missing things after uppgrade to RN57

I have a project made in react-native version 0.55.4. I'm in proccess of migrating this project to react-native 0.57.1. This is going well, but I'm having a little problem with some things that are missing, but only in release version.
In my settings window, I have some fields with their values. Most of field's labels and texts are from i18n RN library. The values are retrieved/stored using redux-persist. This was working fine before migrating. Also, everything works fine in debug version....the problem only occours in release version, but I got no errors in console during release build.
I'm compiling using SDK version 27 (the same I was using before).
Problem:
Build platform is windows.
Solved. Problem was native-base version 2.8.0. Dowgraded to 2.7.2 and worked again.

"babelHelpers.interopRequireDefault is not a function" when upgrading to React Native 0.16.0-rc

I upgraded to react-native 0.16.0-rc, ran npm install, then ran react-native upgrade. When trying to launch the iOS app in a simulator (or device, doesn't matter) I get the error:
[error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: babelHelpers.interopRequireDefault is not a function. (In 'babelHelpers.interopRequireDefault(_reactNative)', 'babelHelpers.interopRequireDefault' is undefined)
I've just about run out of ideas here. Is there something I need to add to my xcode project maybe? Merging the latest react-native templates into mine was a nightmare so maybe something got messed up there.
This problem is discussed in this Github issue and fixed by this commit. You can apply this patch temporarily until it is merged into the project with the version 0.16.