Vue-native-script / environment not working - vue.js

When I run
tns run ios --bundle
Output:
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Preparing project...
Installing pods...
Analyzing dependencies
[!] Unable to find a specification for Socket.IO-Client-Swift (~> 11.0)
You have either:
* out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.
[!] Automatically assigning platform ios with version 9.0 on target fitness because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Unable to apply changes on device: F5BCC0F3-70B6-40D9-AF43-CBEBE1CEDFB5. Error is: 'pod install' command failed..

Do the pod install manually to check where is the problem:
Remove your current build: tns platform remove ios
Build the app source code only: tns build ios --bundle
Navigate to the project folder platforms/ios, run pod install to see if there is error. If it's still same error, remove Podfile.lock if any, then try pod repo update

Related

Why is Expo iOS build failing? ...something with ExpoModulesCore

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

Unable to find a specification for `React-callinvoker` depended upon by `RNReanimated`

I'm trying to run pod install in the ios folder and I get this error.
omsonone#Oms-MacBook-Pro ios % pod install
Ignoring ffi-1.15.4 because its extensions are not built. Try: gem pristine ffi --version 1.15.4
Detected React Native module pods for RNCMaskedView, RNReanimated, RNScreens, react-native-camera, react-native-safe-area-context, and react-native-save-view
Analyzing dependencies
[!] Unable to find a specification for `React-callinvoker` depended upon by `RNReanimated`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
I tried pod repo update but it doesn't help. I'm not sure what to do.

React Native - pod install issue "cannot load such file.......node_modules/react-native/scripts/react_native_pods"

when I have a react native project....and when I run pod install it gives me the following error
Invalid `Podfile` file: cannot load such file -- /myPath/node_modules/react-native/scripts/react_native_pods
Here is my podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'xs' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'xsTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'xs-tvOS' do
# Pods for xs-tvOS
target 'xs-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Ive checked and there is no file called react_native_pods in location myPath/node_modules/react-native/scripts/.
Im wondering if its something to do with npm install is not generating correct files.....however I upgraded node to most recent version and then ran npm install
I ran npm audit fix and it added react_native_pods file and pod install then worked
Run npm audit fix ==> cd ios ==> pod install
If npm audit fix is not working for you then try below solution.
- sudo gem install cocoapods
- npm i
- cd ios
- pod install
It can also be that you just forgot to run yarn / npm before running pod install.
I have meet the same error, solved by upgrade the version of React Native from 0.62 to 0.63, it works for me
Because of the file react_native_pods does't exists in the folder scripts when the version is 0.62, It appears when I upgraded the version of RN to 0.63, after npm install , It works when pod install, hope it would help other who encounter the same error
I just did npm install before running pod install and it solved for me.
In my case Ive deleted yarn.lock, podfile.lock and it worked fine after yarn and pod install again
in order to fix this: what i did is:
react-native upgrade: It mainly upgrades react-native version, which will also upgrade some of your ios files such as Podfile amongst other things.
Try if this works for you or not. You can also create a latest react native project and compare your files/directories using "Beyond compare", also you need to rename some lines in your files.
Also read the comments in files for better understanding.
This wroked for me:
cd ios
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
Via this link.
I had this error in 2022 and this was the most relevant search result and didn't fix it.. so in case anyone else out there is running into this, I fought this for days and finally fixed it by:
Creating a brand new directory by: expo init new-project and then copy over your .js files, screens, and assets etc. Do this by hand, don't copy any of your lock files or node-modules or anything else. Just the files that you created/touched yourself. Then expo start. Load the project on your mobile / simulator and when it fails with a module requirement missing add it individually. Repeat this start-error-add until the build succeeds. This was the only way I found to get it working.
Make sure you've installed your npm dependencies.
Run following command and then install pods.
To install npm packages:
yarn install
And then, remove old pod cache:
cd ios && pod deintegrate && rm -rf Podfile.lock
To update pods and start ios:
pod install --repo-update && cd .. && react-native run-ios
Yarn
cd ios
pod install
Works for me
just install,
#react-native-community/cli-platform-ios
in package.json
then yarn install in your root and cd ios and also arch -x86_64 pod install
verify that you have a node_modules folder, I was missing that
Go and add react-native.pods.rb file inside of Node_Module->React-Native->Scripts->(add here)

AppCenter doesn't seem to run pod install despite existence of Podfile

I've got a react-native app that builds on AppCenter. I have a Podfile in my /ios directory, and locally, I can run pod install. The AppCenter documentation says that "App Center scans the selected branch and if it finds a Podfile, it will automatically do a pod install step at the beginning of every build. This will ensure that all dependencies are installed.", but as far as I can tell, it's not running pod install for my build and the build fails for that reason.
Tried adding pod install to a pre-build script, in which case the build succeeds.
Make sure the Cocoapods version running on the build agent matches the one on your podfile.lock.
You can add a post clone script like this on your ios/ folder:
appcenter-post-clone.sh This will automatically install the matching cocoapods version.
Push that file to your repo, then make sure you open the build configuration and hit Save and Build.
It appears that in addition to having a Podfile, you must NOT have a ios/Pods folder present. In my case, I also had to explicitly add that folder to my .gitignore

How to fix 'boost/operators.hpp' file not found' error in react-native

when I use 'react-native run-ios', there is some error, 'boost/operators.hpp' file not found.
I can not build and run my project:
react-native-cli: 2.0.1
react-native: 0.59.9
npm: 6.9.0
yarn: 1.16.0
node: v12.4.0
os: macos 10.14.5
xcode: 10.2.1
▸ Compiling JSIDynamic.cpp
❌ /Users/lidongbo/WorkBentch/ReactNative/AwesomeProject/node_modules/react-native/React/../third-party/folly-2018.10.22.00/folly/dynamic.h:63:10: 'boost/operators.hpp' file not found
#include <boost/operators.hpp>
^
▸ Analyzing JSCRuntime.cpp
▸ Analyzing jsi.cpp
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 AwesomeProject.xcodeproj
project can build and run.
If you get this issue in react-native-reanimated after upgrading to react-native 0.66 update your react-native-reanimated in package.json
Try "react-native-reanimated": "2.3.0-beta.2"
Don't forget to run yarn install or npm install to update your packages. Also do a pod install for ios and restart your server instance .
EDIT:
Support for react-native#0.66 has been officially added by react-native-reanimated#2.2.3 It is less buggy and a lot more issues have been solved.
Also check issue on github.
This might due to incomplete pods install - try deleting ios/Pods folder and run pod install under ios.
An alternative error for the same issue that I encountered was:
ios/Pods/boost-for-react-native/boost/operators.hpp:97:10: 'boost/config.hpp' file not found
To fix it, you need to clear cocoa pods and cache and re-install.
Delete cocoa pods cache: rm -r ~/Library/Caches/CocoaPods
Delete the Pods folder and the Podfile.lock usually located in <project_root>/ios.
Reinstall pods: pod update
You must delete cache from wherever ios concerns; Here's the process I do to clear its cache:
Delete npm cache: npm cache clean --force
Delete All ios temp files: cd ios && rm -r Pods/ Podfile.lock {yourProject}.xcworkspace
Clear Cocoapods Cache: rm -r ~/Library/Caches/CocoaPods
now install pods via npx: cd .. && npx pod-install
So I was also getting the error boost/operators.hpp file not found but my issue was from using :path instead of :podspec in my Podfile. I'm working on an integrated RN app inside of a Native iOS app, so I was manually adding the pods to the Podfile (something I will not do from now on).
pod 'boost', :path => ...
instead of
pod 'boost', :podspec => ...
It might not be the most common fix but hoping it helps someone.
I resolve the problem.
boost_1_63_0.tar.gz
double-conversion-1.1.6.tar.gz
folly-2018.10.22.00.tar.gz
glog-0.3.5.tar.gz
These files are not completely downloaded due to network reasons.
The file url is :
{your proejct}/node_modules/react-native/scripts/ios-install-third-party.sh at lowest line.
When I upgraded RN 0.64 -> 0.66, the following helped me:
Delete cocoa pods cache: rm -r ~/Library/Caches/CocoaPods
Delete the Pods folder and the Podfile.lock usually located in <project_root>/ios
Delete Pod folder in <project_root>/ios
yarn add react-native-reanimated#2.2.3
pod install