I have a React Native application that I recently updated.
However, on the majority of my modules, I have this error:
#<WeakSet> could not be cloned.
For example, on the module : #react-native-mapbox-gl
When I launch my application, I get the error :
node_modules\#react-native-mapbox-gl\maps\javascript\modules\snapshot\snapshotManager.js: #<WeakSet> could not be cloned.
I also have it on my react-native-vector-icons module.
Is this a common problem?
Thank you!
stop metro
reset repo
reinstall node_packages
run pod install --repo-update
Try deleting node_modules and reinstall with npm install or yarn install again, and then:
IOS:
pod update SDWebImageWebPCoder
pod install --repo-update
build project in Xcode
Android:
Open in Android Studio and Refresh Gradle Dependencies.
build project in Android Studio
Related
Hey guys so I have an expo managed app and I want to use a notification library called Notifee which has an expo plugin. This plugin adds native code not supported by Expo Go, so I'm forced to enter bare workflow and build native iOS and Android folders.
I'm building the iOS package by running expo run:ios. And build fails due to something with ExpoModulesCore:
The following build commands failed:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project
'Pods')
So I did some research and found that others had the same issue here on Stackoverflow. I tried altering the pod file and updating ExpoModulesCore
pod update ExpoModulesCore as this answer suggests
https://stackoverflow.com/a/71104305/8561357
After updating ExpoModulesCore and re-building, I get an additional error:
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/kevin/Library/Developer/Xcode/DerivedData/Addressbook-gmgtddiltntfosevknuexadcwkpt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-BC35D93E0A296DC41D8D893483CBC12F.sh (in target 'FBReactNativeSpec' from project 'Pods')
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
(2 failures)
So why does this happen?
I saw something about Xcode version 13 not working, only 12??
Is Expo version incompatible?
Really trying to figure out what's going on here
maybe its was to late.
if you using react native 0.64.4, add or change expo-module-core version to ^0.6.5 on your package.json.
delete node_modules folder and yarn.lock (if you using yarn)
reinstall node_modules using yarn yarn install
sync node_modules with pod using pod deintegrate and then pod install on ios folder.
install expo modules using npx install-expo-modules from root project.
then build ios using yarn run ios
maybe you need to see similar issue on here:
http://bataxdev.com/blogs/detail/unable-to-find-a-spesification-for-expomodulescore
I have an npm package I installed which I linked to cocoa pods via
npx pod install
I am looking to uninstall this pod as I have already uninstalled the npm package and am having trouble finding an article I am confident in trying since I am new to react-native and want to avoid crashing my app by making a mistake. Is there any easy process to complete this task?
EXTRA
xCode 12.4
React Native 0.63
When you do Pod install, it checks package.json and install pods for only those packages thats requires pod installation. RN v0.63 handles linking and unlinking itself, you don't need to worry about that, it has nothing to do with pod install command. Just do npm uninstall <package-name> and then re-run pod install to update pods as per package.json.
error Could not find "Podfile.lock" at projects\reactNative\ios\Podfile.lock. Did you run "pod install" in iOS directory?
(node:11696) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
error Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues. Run CLI with --verbose flag
Issue 1
For fixing the issue:
Could not find "Podfile.lock" at projects\reactNative\ios\Podfile.lock. Did you run "pod install" in iOS directory?
Please make sure you have install cocoapods and run this command at your project root:
gem install cocoapods // If you haven't install cocoapods
cd ios && pod install && cd ..
Issue 2
For fixing the issue:
(node:11696) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created)
Please downgrade your node.js version to v13.x.x, one of the solutions below:
npm install -g n
sudo n 13.13.0
Issue 3
For fixing the issue:
Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues. Run CLI with --verbose flag
Please make sure you have installed Xcode correctly from App Store and use the latest React Native version in your project (should be v0.62.2 now for stable). If still cannot open the project, please try to add some simulator in Xcode's developer settings.
Cheers!
you did not install cocoapods
install cocoapods commands
sudo gem install cocoapods
after that in react native directory
cd ios && pod install && cd ../ && react-native run-ios
CocoaPods manages library dependencies for your Xcode projects. We need it to setup the iOS project. Like yarn
sudo gem install cocoapods
The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. Like package.json
access to the folder with Podfile, run
pod install
This will resolve the code of those dependency framework, and generate Pods.xcodeproj for your iOS project.
I want to delete react-native-google-signin library.
so I remove it using 'yarn remove react-native-google-signin'
But when I bulid my app, it seems to be there.
How can I solve this error?
In your scenario, after removing library or package you need to do pod install after that for iOS..
SOLUTION
if you are using yarn
yarn remove react-native-google-signin
If you are using npm
npm uninstall --save react-native-google-signin
After that move into your ios folder using cd ios
Then run pod install using pod install
Finally, close existing workspace from XCODE and reopen and before run your project clean your project ( Command+Shift+K ) and run
When I try to use 'react-native-elements' package in my code, I face this error :
bundling failed: Error: Unable to resolve module react-native-vector-icons/FontAwesome from node_modules\react-native-elements\src\social\SocialIcon.js: react-native-vector-icons/FontAwesome could not be found within the project.
I have done many things to fix it. I installed the 'react-native-vector-icons' again, I used 'rm ./node_modules/react-native/local-cli/core/fixtures/files/package.json' but non of them worked. what should I do to overcome this problem? I really appreciate your help guys.
make sure that you've installed the package with
npm install react-native-vector-icons and link it through
react-native link react-native-vector-icons
then for ios you need to install pod (goto your project ios folder on terminal and enter command pod install)
and then reset packager cache with react-native start --reset-cache
if you are using react version <0.60 use react-native link react-native-vector-icons and do the steps link and if react version > 0.60 then cd ios && pod install && cd .. and try again if its not work delete the build folder and rebuild again.