RevenueCat - Ionic React - CocoaPods could not find compatible versions for pod "PurchasesHybridCommon": - ionic-framework

I'm currently trying to implement the RevenueCat SDK with Ionic React (Capacitor) and whilst building the app using Ionic Appflow I get the following error
[18:38:13]: ▸ [error] Error running update: Analyzing dependencies
[18:38:13]: ▸ Fetching podspec for `Capacitor` from `../../node_modules/#capacitor/ios`
[18:38:13]: ▸ Fetching podspec for `CapacitorCommunityHttp` from `../../node_modules/#capacitor-community/http`
[18:38:13]: ▸ Fetching podspec for `CapacitorCordova` from `../../node_modules/#capacitor/ios`
[18:38:13]: ▸ Fetching podspec for `CordovaPlugins` from `../capacitor-cordova-ios-plugins`
[18:38:13]: ▸ Fetching podspec for `CordovaPluginsStatic` from `../capacitor-cordova-ios-plugins`
[18:38:13]: ▸ [!] CocoaPods could not find compatible versions for pod "PurchasesHybridCommon":
[18:38:13]: ▸ In Podfile:
[18:38:13]: ▸ CordovaPluginsStatic (from `../capacitor-cordova-ios-plugins`) was resolved to 2.4.0, which depends on
[18:38:13]: ▸ PurchasesHybridCommon (= 1.2.0)
[18:38:13]: ▸ None of your spec sources contain a spec satisfying the dependency: `PurchasesHybridCommon (= 1.2.0)`.
[18:38:13]: ▸ You have either:
[18:38:13]: ▸ * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
[18:38:13]: ▸ * mistyped the name or version.
[18:38:13]: ▸ * not added the source repo that hosts the Podspec to your Podfile.
[18:38:13]: ▸ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
[18:38:13]: ▸ Sync finished in 3.219s

The comment from #enc_life worked for me (on a Flutter app, not React, but I guess the iOS part works the same either way):
pod install --repo-update
After that everything worked like a charm.
The error message I had was
[!] CocoaPods could not find compatible versions for pod "PurchasesHybridCommon":
In Podfile:
purchases_flutter (from `.symlinks/plugins/purchases_flutter/ios`) was
resolved to 1.4.3, which depends on PurchasesHybridCommon (= 1.4.5)
None of your spec sources contain a spec satisfying the dependency:
`PurchasesHybridCommon (= 1.4.5)`.

Related

flutter No such module 'FBSDKCoreKit' error

I am a beginner at app development.
I am making an app with flutter, and the following error occurred while building with ios.
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code
Swift Compiler Error (Xcode): No such module 'FBSDKCoreKit'
/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7
2
Could not build the application for the simulator.
Error launching application on iPhone 12.
Exited (sigterm)
But I never installed the facebook_auth package.
There is no flutter_facebook_auth in my pubspec.yaml file either.
But I keep getting the above error. Is there any solution?
Thank you for reading.
===============================================================
I did
flutter clean -> flutter pub get -> cd ios -> pod install -> run
And following is the result
/Users/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-1.1.0/ios/Classes/CompressFileHandler.m:109:16: warning: unused variable 'swf' [-Wunused-variable]
const char swf[3] = {'F', 'W', 'S'};
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-1.1.0/ios/Classes/CompressFileHandler.m:110:16: warning: unused variable 'swc' [-Wunused-variable]
const char swc[3] = {'C', 'W', 'S'};
^
4 warnings generated.
warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64 ios-arm64_x86_64-simulator ios-arm64_x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
Command CompileSwift failed with a nonzero exit code
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
warning: Skipping duplicate build file in Copy Bundle Resources build phase: /Users//Downloads/GoogleService-Info.plist (in target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/ly/7jxqf41945g08nj820kfkblr0000gn/T/flutter_tools.QgWT3r/flutter_ios_build_temp_diruHeVSi/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code
Swift Compiler Error (Xcode): No such module 'FBSDKCoreKit'
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7
2
Could not build the application for the simulator.
Error launching application on iPhone 12.
Pod install result is fine.
This is the part of the pod install result
=================================================
pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7 File contents:
facebookauth.swift file contents
===============================================
I found following-facebook auth related- messages when i run the app on real android device
error msg when running on android device
I resolve this error by doing
remove Podfile.lock and Pods
update Podfile with platform :ios, '12.0' and config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
pod install
I also set the iOS deployment target to be 12.0 in the PROJECT.
https://github.com/darwin-morocho/flutter-facebook-auth/issues/299
I modified my Podfile
platform :ios, '11.0'
and config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' (in my case, both version were not same. 11.0 <-> 9.0)
and the error changed like below:
FIRStorageTypedefs.h:29:19: note: declaration here is not visible
typedef NSString *FIRStorageHandle NS_SWIFT_NAME(StorageHandle);
So I did pod uninstall, update, install, update, install..... T___T
arch -x86_64 pod update
arch -x86_64 pod install
and change the version of these like this
firebase_auth: 4.1.0
firebase_core: 2.1.1
cloud_firestore: 4.0.3
firebase_storage: 11.0.3
firebase_messaging: 14.0.3
cloud_functions: 4.0.3
firebase_remote_config: 3.0.3
Addition:
my command line tools of Xcode are already installed
$xcode-select --install
error: command line tools are already installed
install ffi.. all failed
sudo arch -x86_64 gem install ffi
sudo arch -arm64 gem pristine ffi
Thanks to everyone
I had the same problem,
in the podfile was:
platform :ios, '13.0
...
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
in config.build_settings I changed the version from 9.0 to 13.0
and it helped

Flutter - firebase_ml_vision - doesn't build on IOS - textRecognizer doesn't work

Flutter - Trying to get textRecognizer to work on IOS
firebase_ml_vision - doesn't build on IOS
pubspec.yaml:
firebase_core: ^0.7.0
firebase_auth: ^0.20.1
cloud_firestore: ^0.16.0+1
firebase_storage: ^7.0.0
firebase_ml_vision: ^0.10.0
Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
# Can be removed when moving to cocoapods 1.10
config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
end
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
# Inherit the deployment target defined in this Podfile instead, e.g. platform :ios, '11.0' at the top of this file
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
running flutter build ios
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORPrioritizer.h' [-Werror,-Wincomplete-umbrella]
#import "Headers/GoogleDataTransport-umbrella.h"
^
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORRegistrar.h' [-Werror,-Wincomplete-umbrella]
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORStorageEventSelector.h'
[-Werror,-Wincomplete-umbrella]
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORPlatform.h' [-Werror,-Wincomplete-umbrella]
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORStorageProtocol.h' [-Werror,-Wincomplete-umbrella]
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORUploader.h' [-Werror,-Wincomplete-umbrella]
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORAssert.h' [-Werror,-Wincomplete-umbrella]
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORLifecycle.h' [-Werror,-Wincomplete-umbrella]
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORReachability.h' [-Werror,-Wincomplete-umbrella]
<module-includes>:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORUploadPackage.h' [-Werror,-Wincomplete-umbrella]
10 errors generated.
In file included from /Users/user924432/work/zapit/zapit/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m:20:
/Users/user924432/work/zapit/zapit/ios/Pods/FirebaseCoreDiagnostics/GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h:18:9: fatal error:
could not build module 'GoogleDataTransport'
#import <GoogleDataTransport/GoogleDataTransport.h>
~~~~~~~^
While building module 'GoogleUtilities' imported from
/Users/user924432/work/zapit/zapit/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m:22:
<module-includes>:1:1: error: umbrella header for module 'GoogleUtilities' does not include header 'GULLoggerCodes.h' [-Werror,-Wincomplete-umbrella]
#import "Headers/GoogleUtilities-umbrella.h"
^
1 error generated.
12 errors generated.
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Tried pod update
FF035:ios user924432$ pod update
Update all pods
Updating local specs repositories
CocoaPods 1.10.1 is available.
To update use: `sudo gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.10.1
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_ml_vision: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
Downloading dependencies
Installing AppAuth (1.4.0)
Installing BoringSSL-GRPC (0.0.7)
Installing DKImagePickerController (4.3.2)
Installing DKPhotoGallery (0.0.17)
Installing FMDB (2.7.5)
Installing Firebase (7.3.0)
Installing FirebaseAuth (7.3.0)
Installing FirebaseCore (7.3.0)
Installing FirebaseCoreDiagnostics (7.3.0)
Installing FirebaseFirestore (7.3.0)
Installing FirebaseInstallations (7.7.0)
Installing FirebaseInstanceID (7.7.0)
Installing FirebaseMLCommon (7.6.0-beta)
Installing FirebaseMLVision (7.3.0-beta)
Installing FirebaseMessaging (7.3.0)
Installing FirebaseStorage (7.3.0)
Installing Flutter (1.0.0)
Installing GTMAppAuth (1.1.0)
Installing GTMSessionFetcher (1.5.0)
Installing GoogleAPIClientForREST (1.5.1)
Installing GoogleDataTransport (8.1.0)
Installing GoogleSignIn (5.0.2)
Installing GoogleToolboxForMac (2.3.1)
Installing GoogleUtilities (7.2.2)
Installing Mantle (2.1.6)
Installing PromisesObjC (1.2.12)
Installing Protobuf (3.14.0)
Installing SDWebImage (5.10.4)
Installing SDWebImageWebPCoder (0.8.3)
Installing SwiftyGif (5.4.0)
Installing abseil (0.20200225.0)
Installing camera (0.0.1)
Installing cloud_firestore (0.16.0-1)
Installing device_info (0.0.1)
Installing esys_flutter_share (0.0.1)
Installing file_picker (0.0.1)
Installing firebase_auth (0.20.1)
Installing firebase_core (0.7.0)
Installing firebase_messaging (8.0.0-dev.15)
Installing firebase_ml_vision (0.1.1)
Installing firebase_storage (7.0.0)
Installing flutter_exif_rotation (0.3.0)
Installing flutter_html_to_pdf (0.0.1)
Installing flutter_image_compress (0.0.1)
Installing gRPC-C++ (1.28.2)
Installing gRPC-Core (1.28.2)
Installing geolocator (6.2.0)
Installing google_sign_in (0.0.1)
Installing image_picker (0.0.1)
Installing leveldb-library (1.22)
Installing libwebp (1.2.0)
Installing nanopb (2.30906.0)
Installing native_device_orientation (0.0.1)
Installing path_provider (0.0.1)
Installing pdf_render (0.0.1)
Installing permission_handler (5.1.0+2)
Installing receive_sharing_intent (0.0.1)
Installing share (0.0.1)
Installing shared_preferences (0.0.1)
Installing sqflite (0.0.2)
Installing url_launcher (0.0.1)
Installing z_ocr (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 27 dependencies from the Podfile and 62 total pods installed.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
[!] The `Runner [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Runner [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Runner [Profile]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] FirebaseMLCommon has been deprecated
[!] FirebaseMLVision has been deprecated
FF035:ios user924432$
solved:
pod deintegrate
pod update
flutter clean
flutter build ios
NOTE: although it compiles it still doesn't work - see https://github.com/FirebaseExtended/flutterfire/issues/5174
If you're using one of the on-device APIs, include the corresponding
ML Kit library model in your Podfile. Then run pod update in a
terminal within the same directory as your Podfile.
FYI this will currently run into #4625 Thank you
see https://github.com/FirebaseExtended/flutterfire/issues/4625
I was able to get textRecognizer to work on ios with the following:
pubspec.yaml
firebase_core: "^0.5.0"
firebase_auth: ^0.18.1+1
cloud_firestore: ^0.14.1+1
firebase_storage: ^5.0.0-dev.2
firebase_ml_vision: ^0.9.10
Podfile
pod 'Firebase/MLVision'
# If using an on-device API:
pod 'Firebase/MLVisionTextModel'

After upgrading to vue 3 : "Cannot find module '#vue/compiler-sfc/package.json' "

After upgrading to vue 3 :
yarn add vue#next
I get this error: "Cannot find module '#vue/compiler-sfc/package.json" when executing yarn electron:serve
(base) marco#pc01:~/webMatters/electronMatters/GGC-Electron$ yarn add vue#next
yarn add v1.22.5
warning ../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > element-ui#2.13.2" has incorrect peer dependency "vue#^2.5.17".
warning " > vue-class-component#7.2.5" has incorrect peer dependency "vue#^2.0.0".
warning " > vuex#3.5.1" has incorrect peer dependency "vue#^2.0.0".
warning " > vuex-class#0.3.2" has incorrect peer dependency "vue#^2.5.0".
warning " > #vue/test-utils#1.0.5" has incorrect peer dependency "vue#2.x".
warning " > vue-types#2.0.1" has incorrect peer dependency "vue#^2.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 8 new dependencies.
info Direct dependencies
└─ vue#3.0.0-rc.10
info All dependencies
├─ #vue/compiler-core#3.0.0-rc.10
├─ #vue/compiler-dom#3.0.0-rc.10
├─ #vue/reactivity#3.0.0-rc.10
├─ #vue/runtime-core#3.0.0-rc.10
├─ #vue/runtime-dom#3.0.0-rc.10
├─ csstype#2.6.13
├─ estree-walker#2.0.1
└─ vue#3.0.0-rc.10
$ electron-builder install-app-deps
• electron-builder version=22.7.0
• rebuilding native dependencies dependencies=better-sqlite3#5.4.3, fd-lock#1.1.1, integer#2.1.0, sodium-native#2.4.9,
utp-native#2.2.1, sodium-native#3.2.0, sodium-native#3.2.0, sodium-native#3.2.0, sodium-native#3.2.0
platform=linux
arch=x64
• rebuilding native dependency name=fd-lock version=1.1.1
• rebuilding native dependency name=better-sqlite3 version=5.4.3
• rebuilding native dependency name=integer version=2.1.0
• rebuilding native dependency name=sodium-native version=2.4.9
• rebuilding native dependency name=utp-native version=2.2.1
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
Done in 51.95s.
(base) marco#pc01:~/webMatters/electronMatters/GGC-Electron$ yarn electron:serve
yarn run v1.22.5
warning ../package.json: No license field
$ vue-cli-service electron:serve
INFO Starting development server...
ERROR Error: Cannot find module '#vue/compiler-sfc/package.json'
Require stack:
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/config/base.js
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/Service.js
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/bin/vue-cli-service.js
Error: Cannot find module '#vue/compiler-sfc/package.json'
Require stack:
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/config/base.js
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/Service.js
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/bin/vue-cli-service.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
at Function.Module._load (internal/modules/cjs/loader.js:899:27)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/config/base.js:115:30
at /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/Service.js:236:40
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (/home/marco/webMatters/electronMatters/GGC-Electron/node_modules
/#vue/cli-service/lib/Service.js:236:26)
at Service.resolveWebpackConfig (/home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service
/lib/Service.js:240:48)
at PluginAPI.resolveWebpackConfig (/home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-
service/lib/PluginAPI.js:132:25)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I added vue-template-compiler but the problem persists..
(base) marco#pc01:~/webMatters/electronMatters/GGC-Electron$ yarn add vue-template-compiler
yarn add v1.22.5
warning ../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > element-ui#2.13.2" has incorrect peer dependency "vue#^2.5.17".
warning " > vue-class-component#7.2.5" has incorrect peer dependency "vue#^2.0.0".
warning " > vuex#3.5.1" has incorrect peer dependency "vue#^2.0.0".
warning " > vuex-class#0.3.2" has incorrect peer dependency "vue#^2.5.0".
warning " > #vue/test-utils#1.0.5" has incorrect peer dependency "vue#2.x".
warning " > vue-types#2.0.1" has incorrect peer dependency "vue#^2.0.0".
[4/4] Building fresh packages...
warning "vue-template-compiler" is already in "devDependencies". Please remove existing entry first before adding it to
"dependencies".
success Saved 1 new dependency.
info Direct dependencies
└─ vue-template-compiler#2.6.12
info All dependencies
└─ vue-template-compiler#2.6.12
$ electron-builder install-app-deps
• electron-builder version=22.7.0
• rebuilding native dependencies dependencies=better-sqlite3#5.4.3, fd-lock#1.1.1, integer#2.1.0, sodium-native#2.4.9,
utp-native#2.2.1, sodium-native#3.2.0, sodium-native#3.2.0, sodium-native#3.2.0, sodium-native#3.2.0
platform=linux
arch=x64
• rebuilding native dependency name=fd-lock version=1.1.1
• rebuilding native dependency name=better-sqlite3 version=5.4.3
• rebuilding native dependency name=integer version=2.1.0
• rebuilding native dependency name=sodium-native version=2.4.9
• rebuilding native dependency name=utp-native version=2.2.1
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
Done in 49.53s.
(base) marco#pc01:~/webMatters/electronMatters/GGC-Electron$ yarn electron:serve
yarn run v1.22.5
warning ../package.json: No license field
$ vue-cli-service electron:serve
INFO Starting development server...
ERROR Error: Cannot find module '#vue/compiler-sfc/package.json'
Require stack:
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/config/base.js
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/Service.js
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/bin/vue-cli-service.js
Error: Cannot find module '#vue/compiler-sfc/package.json'
Require stack:
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/config/base.js
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/Service.js
- /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/bin/vue-cli-service.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
at Function.Module._load (internal/modules/cjs/loader.js:899:27)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/config/base.js:115:30
at /home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-service/lib/Service.js:236:40
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (/home/marco/webMatters/electronMatters/GGC-Electron/node_modules
/#vue/cli-service/lib/Service.js:236:26)
at Service.resolveWebpackConfig (/home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-
service/lib/Service.js:240:48)
at PluginAPI.resolveWebpackConfig (/home/marco/webMatters/electronMatters/GGC-Electron/node_modules/#vue/cli-
service/lib/PluginAPI.js:132:25)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
If I downgrade vue3 to vue2 the problem disappears:
(base) marco#pc01:~/webMatters/electronMatters/GGC-Electron$ yarn add vue#2
yarn add v1.22.5
warning ../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ vue#2.6.12
info All dependencies
└─ vue#2.6.12
$ electron-builder install-app-deps
• electron-builder version=22.7.0
• rebuilding native dependencies dependencies=better-sqlite3#5.4.3, fd-lock#1.1.1, integer#2.1.0, sodium-native#2.4.9,
utp-native#2.2.1, sodium-native#3.2.0, sodium-native#3.2.0, sodium-native#3.2.0, sodium-native#3.2.0
platform=linux
arch=x64
• rebuilding native dependency name=fd-lock version=1.1.1
• rebuilding native dependency name=better-sqlite3 version=5.4.3
• rebuilding native dependency name=integer version=2.1.0
• rebuilding native dependency name=sodium-native version=2.4.9
• rebuilding native dependency name=utp-native version=2.2.1
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
• rebuilding native dependency name=sodium-native version=3.2.0
Done in 46.79s.
(base) marco#pc01:~/webMatters/electronMatters/GGC-Electron$ yarn electron:serve
yarn run v1.22.5
warning ../package.json: No license field
$ vue-cli-service electron:serve
INFO Starting development server...
Starting type checking service...
Using 1 worker with 2048MB memory limit
98% after emitting CopyPlugin
DONE Compiled successfully in 1419ms
(base) marco#pc01:~/webMatters/electronMatters/GGC-Electron$ vue info
Environment Info:
System:
OS: Linux 5.4 Ubuntu 18.04.5 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU # 4.00GHz
Binaries:
Node: 14.5.0 - ~/.nvm/versions/node/v14.5.0/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v14.5.0/bin/npm
Browsers:
Chrome: 85.0.4183.102
Firefox: 80.0.1
npmPackages:
#vue/babel-helper-vue-jsx-merge-props: 1.0.0
#vue/babel-helper-vue-transform-on: 1.0.0-rc.2
#vue/babel-plugin-jsx: 1.0.0-rc.2
#vue/babel-plugin-transform-vue-jsx: 1.1.2
#vue/babel-preset-app: 4.5.6
#vue/babel-preset-jsx: 1.1.2
#vue/babel-sugar-functional-vue: 1.1.2
#vue/babel-sugar-inject-h: 1.1.2
#vue/babel-sugar-v-model: 1.1.2
#vue/babel-sugar-v-on: 1.1.2
#vue/cli-overlay: 4.5.6
#vue/cli-plugin-babel: ~4.5.6 => 4.5.6
#vue/cli-plugin-e2e-cypress: ~4.5.6 => 4.5.6
#vue/cli-plugin-router: ~4.5.6 => 4.5.6
#vue/cli-plugin-typescript: ~4.5.6 => 4.5.6
#vue/cli-plugin-unit-mocha: ~4.5.6 => 4.5.6
#vue/cli-plugin-vuex: ~4.5.6 => 4.5.6
#vue/cli-service: ~4.5.6 => 4.5.6
#vue/cli-shared-utils: 4.5.6
#vue/compiler-core: 3.0.0-rc.10
#vue/compiler-dom: 3.0.0-rc.10
#vue/component-compiler-utils: 3.2.0
#vue/preload-webpack-plugin: 1.1.2
#vue/reactivity: 3.0.0-rc.10
#vue/runtime-core: 3.0.0-rc.10
#vue/runtime-dom: 3.0.0-rc.10
#vue/shared: 3.0.0-rc.10
#vue/test-utils: ^1.0.5 => 1.0.5
#vue/web-component-wrapper: 1.2.0
babel-helper-vue-jsx-merge-props: 2.0.3
typescript: ^4.0.2 => 4.0.2
vue: ^3.0.0-rc.10 => 3.0.0-rc.10
vue-class-component: ^7.2.5 => 7.2.5
vue-cli-plugin-electron-builder: ~2.0.0-rc.4 => 2.0.0-rc.4
vue-color: ^2.7.1 => 2.7.1
vue-draggable-resizable: ^2.2.0 => 2.2.0
vue-hot-reload-api: 2.3.4
vue-i18n: ^8.20.0 => 8.20.0
vue-loader: 15.9.3 (16.0.0-beta.7)
vue-pdf: ^4.1.0 => 4.1.0
vue-property-decorator: ^9.0.0 => 9.0.0
vue-resize-sensor: 2.0.0
vue-router: ^3.2.0 => 3.3.4
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.12 => 2.6.12
vue-template-es2015-compiler: 1.9.1
vue-types: ^2.0.1 => 2.0.1
vuex: ^3.5.1 => 3.5.1
vuex-class: ^0.3.2 => 0.3.2
npmGlobalPackages:
#vue/cli: 4.4.6
electron: 10.0.0
How to solve the problem?
Looking forward to your kind help
The commands to get it working are:
yarn add vue#next
yarn add #vue/compiler-sfc -D
Note the -D to add it to the devDependencies rather than the dependencies.
Then to remove the old dependency:
yarn remove vue-template-compiler
Note that vue#next currently points at the latest release of Vue 3 but that will likely change in future.
I posted a longer explanation on the Vue forums:
https://forum.vuejs.org/t/after-upgrading-to-vue-3-cannot-find-module-vue-compiler-sfc-package-json/103424
Update:
For anyone using npm rather than yarn, the same 3 commands should work if you change the first word from yarn to npm.
vue-template-compiler is the old package for vue 2. Install #vue/compiler-sfc https://www.npmjs.com/package/#vue/compiler-sfc and you should be good to go
In my case the vue-loader version was updated to ^17.X and i had to downgrade to ^15.x.x
I had a similar issue, the one command that saved me this time was:
vue update...
It turned out that I had #vue/cli-service 3... in my package.json and needed the latest version (4.5...). The previous one was looking for the wrong compiler apparently (ie. not the one ending with sfc).
The note on the #vue/compiler-sfc npm page says
Note: as of 3.2.13+, this package is included as a dependency of the main vue package and can be accessed as vue/compiler-sfc. This means you no longer need to explicitly install this package and ensure its version match that of vue's. Just use the main vue/compiler-sfc deep import instead.
In light of that, I just added this to my package.json and it fixed the issue.
"#vue/compiler-sfc": "file:node_modules/vue/compiler-sfc",
If your vue version is higher than 3.2.13 then check your project/node_modules/#vue/compiler-sfc, if path exists then you can add this line in package.json:
"#vue/compiler-sfc": "file: node_modules/#vue/compiler-sfc",
This config tells npm to look for package.json in this path, since when you install vue the compiler-sfc will also be installed, you are good to go.
i ran into a similar problem and found out it came from the name i gave my vue project after running npm init vue#latest. So avoid using names that refer directly to vue's version, etc... and it might just do the trick

IONIC Package Failed to install ‘onesignal-cordova-plugin’: Error: pod: Command failed with exit code 31

I’m trying to use ionic pro packaging (https://ionicframework.com/pro/package). When building to android everything works fine. But building to IOS gives me this error:
Looking for related GitHub issues on fastlane/fastlane…
\e[91mFailed to upload ipa to storage please retry your build.\e[0m
MAC Iteration 1
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
/Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane_core/lib/fastlane_core/ui/interface.rb:145:in `shell_error!’: [!] Exit status of command ‘cordova platform add ios --nofetch’ was 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
Adding ios project…
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: com.notified.x
Name: Notified
iOS project created with cordova-ios#4.5.4
Discovered plugin “cordova-plugin-whitelist” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-whitelist#^1.3.3” via npm
Installing “cordova-plugin-whitelist” for ios
Adding cordova-plugin-whitelist to package.json
Saved plugin info for “cordova-plugin-whitelist” to config.xml
Discovered plugin “cordova-plugin-device” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-device#^2.0.2” via npm
Installing “cordova-plugin-device” for ios
Adding cordova-plugin-device to package.json
Saved plugin info for “cordova-plugin-device” to config.xml
Discovered plugin “cordova-plugin-splashscreen” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-splashscreen#^5.0.2” via npm
Installing “cordova-plugin-splashscreen” for ios
Adding cordova-plugin-splashscreen to package.json
Saved plugin info for “cordova-plugin-splashscreen” to config.xml
Discovered plugin “cordova-plugin-ionic-webview” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-ionic-webview#^1.2.1” via npm
Installing “cordova-plugin-ionic-webview” for ios
Adding cordova-plugin-ionic-webview to package.json
Saved plugin info for “cordova-plugin-ionic-webview” to config.xml
Discovered plugin “cordova-plugin-ionic-keyboard” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-ionic-keyboard#^2.1.2” via npm
Installing “cordova-plugin-ionic-keyboard” for ios
Adding cordova-plugin-ionic-keyboard to package.json
Saved plugin info for “cordova-plugin-ionic-keyboard” to config.xml
Discovered plugin “cordova-plugin-app-name” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-app-name#^1.0.4” via npm
Installing “cordova-plugin-app-name” for ios
Adding cordova-plugin-app-name to package.json
Saved plugin info for “cordova-plugin-app-name” to config.xml
Discovered plugin “cordova-plugin-inappbrowser” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-inappbrowser#^3.0.0” via npm
Installing “cordova-plugin-inappbrowser” for ios
Adding cordova-plugin-inappbrowser to package.json
Saved plugin info for “cordova-plugin-inappbrowser” to config.xml
Discovered plugin “cordova-plugin-statusbar” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-statusbar#^2.4.2” via npm
Installing “cordova-plugin-statusbar” for ios
Adding cordova-plugin-statusbar to package.json
Saved plugin info for “cordova-plugin-statusbar” to config.xml
Discovered plugin “cordova-plugin-ionic” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-ionic#^4.1.7” via npm
Installing “cordova-plugin-ionic” for ios
Plugin dependency “cordova-plugin-splashscreen#5.0.2” already fetched, using that version.
Dependent plugin “cordova-plugin-splashscreen” already installed on ios.
Adding cordova-plugin-ionic to package.json
Saved plugin info for “cordova-plugin-ionic” to config.xml
Discovered plugin “cordova-plugin-cocoapod-support” in config.xml. Adding it to the project
Fetching plugin “cordova-plugin-cocoapod-support#^1.5.0” via npm
Installing “cordova-plugin-cocoapod-support” for ios
Adding cordova-plugin-cocoapod-support to package.json
Saved plugin info for “cordova-plugin-cocoapod-support” to config.xml
Discovered plugin “onesignal-cordova-plugin” in config.xml. Adding it to the project
Fetching plugin “onesignal-cordova-plugin#^2.1.0” via npm
Installing “onesignal-cordova-plugin” for ios
Failed to install ‘onesignal-cordova-plugin’: Error: pod: Command failed with exit code 31
at ChildProcess.whenDone (/Users/ionic/builds/TechNotified/notified-mobile-app/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
Failed to restore plugin “onesignal-cordova-plugin” from config.xml. You might need to try adding it again. Error: Error: pod: Command failed with exit code 31
Searching for new pods
Checking config.xml for pods.
Installing pods
Sit back and relax this could take a while.
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.
[!] The Podfile does not contain any dependencies.
Updating ios build to use workspace.
Adding schemes
–save flag or autosave detected
Saving ios#~4.5.4 into config.xml file …
I’ve installed cocoa pods but that didn’t help.
A lot of threads tells me to do this: “Run pod repo update first. I had the same issue and it helped.” but that is only possible on OS X i think?
I have spent almost a day on this thing now. As usual the ionic documentation only says something like “Click the build button and it’s all done”. https://ionicframework.com/docs/pro/package/
I solved it by doing this steps: Package native binaries Failed to install 'onesignal-cordova-plugin' then i still got the same error and noticed it said version "^2.1.0" instead of just "2.1.0" on the onesignal-cordova-plugin error line. So i found that it still had the "^" in the version number in both the config.xml and the package.json file. When i removed both it worked!

Ionic :app:processDebugGoogleServices (Version conflict)

I installed push plugin on ionic app and got this build fail
Found firebase-messaging:11.6.2, but version 11.0.4 is needed for the google-services plugin.
:app:processDebugGoogleServices FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
>
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.0.4.
my build.gradle (module:app)
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: ":CordovaLib"))
compile "com.facebook.android:facebook-android-sdk:4.+"
compile "com.google.android.gms:play-services-base:11.0.4"
compile "com.google.android.gms:play-services-ads:11.0.4"
compile "com.android.support:support-v13:23+"
compile "com.android.support:support-v13:27.+"
compile "me.leolin:ShortcutBadger:1.1.17#aar"
compile "com.google.firebase:firebase-messaging:11.6.2"
// SUB-PROJECT DEPENDENCIES END
}
Declare the FCM version in config.xml like this:
<plugin name="phonegap-plugin-push" spec="^2.1.3">
<variable name="FCM_VERSION" value="11.6.2" />
</plugin>
If that doesn't work, some of the steps of I use to solve pesky Ionic build problems are:
rm -rf node_modules
ionic cordova platform rm
rm -rf platforms
rm -rf plugins
npm install
ionic cordova platform add