Updating app to newer react-native - react-native

I wanna update a mobile app to a newer react-native version. I followed instructions from here, installed react-native-git-upgrade, went to my project's dir, ran react-native-git-upgrade 0.40.0, got lots of warnings like warning: unable to unlink path/to/some/project/file: Permission denied', tried with sudo, didn't have these errors, got output that to some files patch didn't apply, to some files it was applied cleanly, and to some other files it was applied with conflicts. As the docs said, the next step should have been fixing conflicts, but after these actions, described above my project's dir is still unchanged - my editor doesn't detect any file changes, I've opened files, listed as patched with conflicts and they didn't have any changes and didn't have conflict delimiters (like <<<<<<< ours). Looks like nothing happened. What am I doing wrong, and how can I do it right?

Related

EAS building fails with package.json error

Using Managed workflow
Your eas-cli version
eas-cli/2.7.0
win32-x64
node-v16.10.0
What you have tried so far
Clicked through every link on Google I could find (none mentioned this error specifically)
Read the Expo Documentation as well as Troubleshooting Guide
Ensured that the package.json is in the root directory
Error: package.json does not exist in /Users/expo/workingdir/build
I am building for iOS and having no issues up to the ‘Prepare Project’ phase. Each subsequent fails with the same error.
I have no idea where the ‘/Users/expo/workingdir/build’ directory actually is, as I don’t have an ‘expo’ user on my machine. Do I need to create these directories?
I don't post here so let me know if I need to add anything else.

React Native Xcode 13.2 Error no such file or directory for NativeVibration.js

After creating the project with react-native init, i found this issue in terminal as well as in xcode. After digging deep, i found that this particular file is showing missing in project node modules.
Here are example of error codes showing in xcode & terminal-
Error: ENOENT: no such file or directory,
/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../Libraries/Vibration/NativeVibration.js
I've learned the hard way when programming in react native (for cross platform/hybrid application development), many unknown issues will be caused if you deviate from native OS clustering. Make sure you don't make the same mistakes as I have.
I have more specific help for you, apart from the obi wan style in my previously semi-answer.
Another guy had an issue with this a few years back, he asked and was answered,"delete your node_modules and app from simulator. Then re-install everything back, clear cache and see if it start bundler from root directory.
Before doing that, you can try 'react-native start' from your root directory.
I have seen that error message a lot, specifically with jest. But that's a different fix. I realize you are not using jest to test your reactjs, but it is jest tests runner that is the problem that causes the same outcome as you have come to- solution there is to disable the jest runner from running in the background while installing new packages.
I wonder if there isn't a similar solution here - only applicable to xcode - although you see it in terminal, that's probably just the cmdline not recognizing the path to the directory or at least that file.
Should be easy to figure out with terminal--
Go to $HOME~ type dir or ls, to see your directory folders, if you see the project listed, cd into it or, just search for the directory apt-get search [package] or apt, pkg, pip, pacman, snap etc etc whatever your flavor if OS terminal is, or search for the file-- $find / -iname [query] or even search for all paths containing the phrase: $locate [query]... If you created it, it exists. Just because xcode can't find it, and initial attempts in term produced nada, don't believe it is not in your system. just a matter of where, what, and why a process or dependancy is missing or malfunctioning in attempt to retrieve the file & open it.
You can definitely find it - i don't know jack about xcode, but terminal -- I can get anything from anywhere on cmdline-- you can too. I have to go, but I'm curious if you have figured it out. Let us know yeah? Best of luck to you. Cheers QwaziRidwanhasib.
-Cujo

Installed package has out-of-date header files

The node-addon-api package is installed and I have been compiling using those header files just fine. But I went to take advantage of a feature and my addon would not compile; the symbol was missing from the headers. After comparing to the header file in their github repository, it was clear that what's installed is not what's current.
The file dates of everything (on a Windows install) is shown as 26-Oct-1985, but I don't know if that's npm just not getting the date right when it writes the file out, or what.
What do I need to do to get the current version in place? npm reports that v.3.0.2 is installed, but even after deleting the directory and letting npm fetch it again, the files are out-of-date.
This was strange; I finally realized that the reason the file kept looking like it was out of date was because the text editor I had it loaded in was not reloading when the file got rewritten by npm -- probably because of the file's datestamp never changing from 26-Oct-85. I discovered this after taking a diff between the installed file and the one in a clone of the package's repo: no difference.

Cocoapods Errors : Resource.sh not found

Folks,
Cocoapods : 0.39.0
FYI I have done enough research and I was able to take care of errors like:
Podfile.lock not found.
.menifest not found
and others while building my project.
Which still seem hack to me but as long as they let me build I dont care.
But one real problem is this :
Pod-resources.sh not found and this one is in the pod directory.
so for sure Its not in my source control as I dont check in pods dir into my project.
I have done more than enough weokspace deletion, podlock deletion, who pods dir deletion and pod install. but this problem is still there.
I am using apptentive which has a resource bundle, which need to be copied to the app binary.
At the moment I have disable Apptentive thru out the project to speed up the development and keep looking for solution.
Links that I have read are follows :
https://github.com/CocoaPods/CocoaPods/issues/2303
is from July 10, 2014 : seem too old to rely on.
CocoaPods Errors on Project Build
Error:"The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods
The sandbox is not in sync with the Podfile.lock-ios
Error:"The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods
How I solved my partial problem : delete workspace file, Pods Dir and .lock file. If this can help anybody.
Culprit was the path. It seem how Cocoapods is handling is different than earlier.
What it dont do is updating your project file for Copy Resources phase:
it seems they have update the path and now it has "/Target Support Files/Pods-ProjectName/" in it.
Older path: "${SRCROOT}/Pods/Pods-ProjectName-resources.sh"
New Path: "${SRCROOT}/Pods/Target Support
Files/Pods-projectName/Pods-Project-resources.sh"
So if you are having same errors like me you need to do is :
remove workspace file
remove .podlock file
remove .menifest file
do Pod install
update the path in build phase in xcode project file as shown above.
Now Build the project/workspace
Hope this will save someone's time.
You might have to add a PODS_ROOT user-defined build setting, as described here.

Spine.js and Hem: Getting started

I successfully created a Spine app as explained on Spine's Getting started page.
However, Hem doesn't automatically take my changes into account; I have to build manually.
I have the same problem when I follow the contact screencast, but this time Hem does not build at all:
art-mac:spine.contacts art$ hem build
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Cannot find module: spine/lib/tmpl. Have you run `npm install .` ?
I did run 'npm install .'
Surprisingly, when I reinstall spine.contact (in another folder), the contacts I created in the previous contact application appear in the new application...
"Disable cash" in my Chrome development settings in is checked.
I was having the same problem when I first upgraded hem to version 0.1.9. One thing to check for is if there are compiled application.js and application.css files in the public folder of your application. It seems like when these files already exist hem server would serve those files instead of recompiling from the sources. Once those files are removed hem server would then use the source files to dynamically create the application files.
But this behavior did seem a bit different from older versions of hem. I was able to make a couple of changes to the hem server so that it seem to work as before, in that the hem server would always compile from the source files regardless if the application files already existed. I posted the code changes on a similar issue at the hem github repository https://github.com/maccman/hem/issues/46#issuecomment-6550866, but I'm not sure if its a hem issue or if something changed with the strata web server library that hem uses.
The latest Hem in npm (0.2.7) should solve this issue.
The strata server was having issues serving files dynamically if they already existed.
Hem 0.1.9 (the latest version) is not automatically detecting changes to my spine app when running "hem server"(although "hem watch" seems to be working correctly). I was able to get it working by uninstalling 0.1.9 (npm uninstall -g hem) and installing 0.1.8 instead (npm install -g hem#0.1.8).
Regarding your other issue, spine/lib/tmpl is no longer included in the latest version of spine, so if you want to use the screencast you'll need to install whatever version of spine he is using.