Recently, when I yarn eas build my expo project I have started failing with
[INSTALL_PODS] Using Expo modules
[INSTALL_PODS] [Expo] Enabling modular headers for pod ExpoModulesCore
...
[INSTALL_PODS] [!] Invalid `Podfile` file:
[INSTALL_PODS] [!] Invalid `RNGestureHandler.podspec` file: undefined method `exists?' for File:Class.
...
[INSTALL_PODS] # -------------------------------------------
[INSTALL_PODS] #
[INSTALL_PODS] > isUserApp = File.exists?(File.join(__dir__, "..", "..", "node_modules", "react-native", "package.json"))
[INSTALL_PODS] # if isUserApp
[INSTALL_PODS] # -------------------------------------------
I don't build locally often (remote builds on the Expo servers do fine) so any number of things might have triggered this over the past several weeks, including a migration from an Intel MBP to an M2 MBA, but I wonder if there's an obvious reason that someone has experience with. The error suggests there's something wrong with the podfile's use of an undefined method. But the suggestions for addressing this I've found online involve all kinds of tweaking that are way beyond what I'm familiar with. My experience with Expo/EAS just been to be sure to
brew install cocoapods fastlane
and don't involve much more than that. Ideally I'd like to avoid messing with special gem installations of the sort suggested as quick fixes.
So the question is: is this indeed just a bug in a podfile (use of a deprecated method) that will eventually get fixed?
UPDATE: Broadly it seems that the answer is "yes": this does get fixed in later versions of the affected packages, but those packages are not officially compatible with Expo. If I update them to versions that allow building, then I get warnings:
[RUN_EXPO_DOCTOR] [16:17:37] Some dependencies are incompatible with the installed expo package version:
[RUN_EXPO_DOCTOR] [16:17:37] - react-native-gesture-handler - expected version: ~2.8.0 - actual version installed: 2.9.0
[RUN_EXPO_DOCTOR] [16:17:37] - react-native-reanimated - expected version: ~2.12.0 - actual version installed: 2.14.4
so the question becomes: when will Expo officially support package versions required to successfully build?
Ruby 3.2.0 removed File.exists?.
This issue was reported on the expo repo on GitHub.
The recommended fix is to upgrade to expo#47.0.13.
Related
I am developing a Flutter app for Android and iOS. The app is in a stable state of development on the Android simulator so I thought I would try to run it on the iOS simulator. The Flutter installation process on Macos requires installing Cocoapods. After trying to use the Macos installation of Ruby and encountering permission errors, I decided to try asdf, the latest version of Ruby (Ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-darwin21]), and Cocoapods (1.11.2). The installation appeared to be successful, but running pod results in the following error:
Error loading the plugin cocoapods-plugins-1.0.0.
NoMethodError - undefined method activate' for #<Gem::StubSpecification:0x00007f963819f4f8 #extension_dir=nil, #full_gem_path="/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-plugins-1.0.0", #gem_dir=nil, #ignored=nil, #loaded_from="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/specifications/cocoapods-plugins-1.0.0.gemspec", #data=#<Gem::StubSpecification::StubLine:0x00007f9638194850 #name="cocoapods-plugins", #version=#<Gem::Version "1.0.0">, #platform="ruby", #extensions=[], #full_name="cocoapods-plugins-1.0.0", #require_paths=["lib"]>, #name=nil, #spec=#<Gem::Specification:0x00007f96381cc278 #extension_dir=nil, #full_gem_path="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-plugins-1.0.0", #gem_dir=nil, #ignored=nil, #bin_dir=nil, #cache_dir=nil, #cache_file=nil, #doc_dir=nil, #ri_dir=nil, #spec_dir=nil, #spec_file=nil, #gems_dir="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems", #base_dir="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0", #loaded=true, #activated=true, #loaded_from="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/specifications/cocoapods-plugins-1.0.0.gemspec", #original_platform=nil, #installed_by_version=#<Gem::Version "3.3.2">, #autorequire=nil, #date=2016-05-10 00:00:00 UTC, #description=" This CocoaPods plugin shows information about all available CocoaPods plugins\n (yes, this is very meta!).\n This CP plugin adds the \"pod plugins\" command to CocoaPods so that you can list\n all plugins (registered in the reference JSON hosted at CocoaPods/cocoapods-plugins)\n", #email=nil, #homepage="https://github.com/cocoapods/cocoapods-plugins", #name="cocoapods-plugins", #post_install_message=nil, #signing_key=nil, #summary="CocoaPods plugin which shows info about available CocoaPods plugins.", #version=#<Gem::Version "1.0.0">, #authors=["David Grandinetti", "Olivier Halligon"], #bindir="bin", #cert_chain=[], #dependencies=[<Gem::Dependency type=:runtime name="nap" requirements=">= 0">, <Gem::Dependency type=:development name="bundler" requirements="~> 1.3">, <Gem::Dependency type=:development name="rake" requirements=">= 0">], #executables=[], #extensions=[], #extra_rdoc_files=[], #files=[], #licenses=["MIT"], #metadata={}, #platform="ruby", #rdoc_options=[], #require_paths=["lib"], #required_ruby_version=#<Gem::Requirement:0x00007f96381d7b28 #requirements=[[">=", #<Gem::Version "2.0.0">]]>, #required_rubygems_version=#<Gem::Requirement:0x00007f96381d7ee8 #requirements=[[">=", #<Gem::Version "0">]]>, #requirements=[], #rubygems_version="3.3.2", #specification_version=4, #test_files=[], #new_platform="ruby", #full_name="cocoapods-plugins-1.0.0", #full_require_paths=["/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-plugins-1.0.0/lib"] cocoapods-plugins-1.0.0>, #base_dir="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0", #gems_dir="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems", #default_gem=false, #activated=true> Did you mean? activated? /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in safe_activate_and_require'
/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:in block in load_plugins' /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in map'
/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in load_plugins' /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:326:in block in run'
/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:325:in each' /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:325:in run'
/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in run' /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>'
/Users/xyz/.asdf/installs/ruby/3.0.3/bin/pod:25:in load' /Users/xyz/.asdf/installs/ruby/3.0.3/bin/pod:25:in '
I do not need a fix. I just want to know versions of Ruby and Cocoapods that are compatible and allow me to make progress on developing my Flutter app on Macos.
After I posted the above issue, others encountered the same problem as reported here: https://github.com/CocoaPods/CocoaPods/issues/11134
The workaround for the problem is to use Ruby 2.7.5. After installing that version, I found Cocoapods 1.11.2 is compatible with Ruby 2.7.5.
brew install ruby#2.7
export PATH="/usr/local/opt/ruby#2.7/bin:$PATH"
Question
I'm new to Substrate and going through Add a Pallet to Your Runtime. At first, running the command cargo check -p node-template-runtime gave me error
error: failed to parse manifest at `/Users/bashar/work/substrate/start/substrate-node-template/pallets/template/Cargo.toml`
Caused by:
feature `rename-dependency` is required
consider adding `cargo-features = ["rename-dependency"]` to the manifest
I added it and then I started getting this error:
error: no matching version `^2.0.0` found for package `codec`
location searched: registry `https://github.com/rust-lang/crates.io-index`
versions found: 0.0.0
required by package `frame-benchmarking-cli v3.0.0`
... which is depended on by `node-template v3.0.0 (/Users/bashar/work/substrate/start/substrate-node-template/node)`
I tried modifying the codec version to 2.0.1 with no luck. My setup
rustup 1.23.1
rustc 1.50.0
cargo 1.30.0
Any idea what I'm doing wrong?
UPDATE
I went back to the Create Your First Substrate Chain, which this tutorial is built on, started from scratch, which the Pallet tutorial is based on. And this time, after cloning the repository for first tutorial, cargo build --release failed with the same error feature rename-dependency is required.
This built fine the first time before I moved to the second tutorial. Which makes me think maybe a recent Mac update ruined something? I even tried uninstalling Rust and re-installing it, then installing a new template. Same thing
Since upgrading from Heroku-16 to Heroku-18 stack, my .NET Core 2.2 App that references System.Drawing.Common to use GDI+ throws the error:
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
--->System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.
at System.Runtime.InteropServices.FunctionWrapper `1.get_Delegate()
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip..cctor()
This is because libc6-dev is not installed (see this issue). I'm using heroku-buildpack-apt to install both libgdiplus and libc6-dev), but it appears that the package is no longer available at runtime on Heroku-18, only at build time (see this page).
From the build log:
remote: -----> Fetching .debs for libc6-dev
remote: Reading package lists...
remote: Building dependency tree...
remote: Reinstallation of libc6-dev is not possible, it cannot be downloaded.
remote: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reverting back to Heroku-16 solves the issue.
How can this I make this work on the Heroku-18 stack?? Anyone found a way?
From Heroku support:
I am really sorry for the trouble but it will not be possible in my view. This package libc6-dev2.27-3ubuntu1 means that the package is available only at build time, but not at runtime. Moreover if you have some requirement you can check https://elements.heroku.com/buildpacks/eugeneotto/heroku-buildpack-secp256k1 but this is not officially supported buildpack and we do not provide support for this.
.NET Core 3.x, together with the latest version of System.Drawing.Common, contain fixes which remove the dependency on libc6-dev.
If installing libc6-dev is not possible, you can try to:
Upgrade to .NET Core 3.0
Upgrade to libgdiplus 4.6.0 or later (I'd recommend 4.7.0)
I want to program in Haskell using Atom on a Mac. Therefore I installed the following packages in Atom:
haskell-ghc-mod
ide-haskell
ide-haskell-cabal
language-haskell
After that I installed the Haskell Platform 8.2.1 from here:
https://www.haskell.org/platform/#osx-none
This did not seem to work as I cannot compile and during every start of Atom there is this error message:
Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT
Then I tried installing the necessary packages manually as described on https://atom-haskell.github.io/installation/installing-binary-dependencies/ which also failed (even unregistering failed):
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal install ghc-mod stylish-haskell
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.8.0.0 (user goal)
next goal: base (dependency of ghc-mod-5.8.0.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: ghc-mod => base<4.10 &&
>=4.6.0.1)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal uninstall ghc-mod stylish-haskell
cabal: This version of 'cabal-install' does not support the 'uninstall'
operation. It will likely be implemented at some point in the future; in the
meantime you're advised to use either 'ghc-pkg unregister ghc-mod' or 'cabal
sandbox hc-pkg -- unregister ghc-mod'.
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ ghc-pkg unregister ghc-mod
ghc-pkg: cannot find package ghc-mod
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal sandbox hc-pkg -- unregister ghc-mod
ghc-pkg: cannot find package ghc-mod
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal install ghc-mod stylish-haskell
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.8.0.0 (user goal)
next goal: base (dependency of ghc-mod-5.8.0.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: ghc-mod => base<4.10 &&
>=4.6.0.1)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
I already searched stackoverflow for answers but nothing really worked for me. Can anybody tell me what I am missing?
I can advise you on one part of the problem. The error message from cabal is very confusing, but what it means is:
ghc-mod does not work with a version 4.10.0.0 of the base
The base library ships with GHC and cannot be changed
GHC 8.2.1 ships with base 4.10.0.0
Therefore: you cannot build ghc-mod with the version of the Haskell Platform you downloaded
You can work around this by downloading an older Haskell Platform (8.0.2). In my opinion: it's premature for the promoted Haskell Platform version to be 8.2.1.
Another approach is using Stack, which will manage the installation of GHC installations for you. In this case, running stack install ghc-mod should just work. But since you'll still be using GHC 8.2.1 from the Haskell Platform, it won't do you much good, since ghc-mod is tied to your GHC version.
Personally: I never had success setting up ghc-mod. I've also never used either Atom or VS Code, but I've heard people sharing good experiences with VS Code + Haskero, so if you're looking for an IDE-like experience, that may be something worth considering. I've switched over to using emacs+intero mode, which may be something to consider.
Here are some links that may be helpful on getting started with tooling:
https://haskell-lang.org/get-started
https://haskell-lang.org/intero
Trying to get a play 2.0.2 application going on heroku and it seems it is not yet supported.
Has anyone had any luck with this?
Error:
http://s3pository.heroku.com/maven-scala-tools-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.11.3/sbt_2.9.1-0.11.3.pom
-- artifact org.scala-tools.sbt#sbt_2.9.1;0.11.3!sbt_2.9.1.jar:
http://s3pository.heroku.com/maven-scala-tools-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.11.3/sbt_2.9.1-0.11.3.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-tools.sbt#sbt_2.9.1;0.11.3: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-tools.sbt#sbt_2.9.1;0.11.3: not found
Error during sbt execution: Error retrieving required libraries
(see /tmp/build_7sg3kay36u6a/project/boot/update.log for complete log)
Error: Could not retrieve sbt 0.11.3
! Failed to build app with SBT 0.11.0
! Heroku push rejected, failed to compile Scala app
This was happening because of old cache (my app had been deployed on heroku before, hence the old cache)
From the root of your play application, do
heroku config:add BUILDPACK_URL='https://github.com/heroku/heroku-buildpack-scala#cleancache'
then push your app again
This will drop all cached artifacts and the sbt jar and re-download up to date fresh ones.
Just remember to do heroku config:remove BUILDPACK_URL afterwards or each time you push the cache will be dropped and builds will take a while.
Kudos to scott # play googlegroups
https://groups.google.com/forum/#!topic/play-framework/yUDfW2UtBjs
This could be unrelated, but I had some conflicting plugin in myhomedir/.sbt/plugins/build.sbt that messed up my Play 2.0.2 build. Removing that fixed it for me.
I had this exact error on my Mac and it was because MacPorts did not install the correct version of SBT (sudo port install sbt gave me 0.11.2 not 0.11.3) - yes I updated my port tree. So I sudo port uninstalled sbt and used brew install sbt. This (Homebrew) installed 0.11.3 and the problem disappeared. I would suggest checking the sbt version on Heroku.
If you encounter this on play 2.0.4 (I know, this question is for play 2.0.2, but it's first on google):
change the sbt version to 0.11.3:
Change sbt version in project/build.properties to 0.11.3