braindeaf

braindeaf

Need help with examples in chapter 2 of GraphQL APIs in Elixir with Absinthe book

Just opening GraphQL API in Elixir with Absinthe and realised I need Elixir 1.5.0 / OTP 20 to get the examples running. Is there an up to date version of the sample code anywhere or is there a surefire way of getting OTP 20 running on MacOSX 12.5.1

I’m using ASDF and it’s just spitting out the following and I am just staring blankly. I am not even sure I can get it running under Monterey.

The asdf_20.3.8.26 build has been deleted
Extracting source code
Building Erlang/OTP 20.3.8.26 (asdf_20.3.8.26), please wait...
Build failed.
configure: error: 

  You are natively building Erlang/OTP for a later version of MacOSX
  than current version (12.5.1). You either need to
  cross-build Erlang/OTP, or set the environment variable
  MACOSX_DEPLOYMENT_TARGET to 12.5.1 (or a lower version).


make: *** No rule to make target `is_cross_configured'.  Stop.
make: *** No rule to make target `all'.  Stop.

Please see /Users/rl/.asdf/plugins/erlang/kerl-home/builds/asdf_20.3.8.26/otp_build_20.3.8.26.log for full details.

Failed at the first hurdle of Chapter 2. Boooo

Many thanks

RobL

Most Liked

dimitarvp

dimitarvp

Doesn’t the code work with the latest Erlang and Elixir?

kokolegorille

kokolegorille

Yes it does… last time I tried, I just started a new project, and added latest version of Absinthe + deps.

I also added dataloader, and could proceed with the code.

slouchpie

slouchpie

What the previous two posts are saying is that you can probably edit .tool-versions file in the repository. Change it to something like this:

elixir 1.14.0-otp-25
erlang 25.1.1

Then run asdf install again and start from the beginning (get deps, compile, etc)

dimitarvp

dimitarvp

Since it’s not a trade-secret app and just an exercise one, you can make a GitHub repo and share the link here. Somebody will check it out and tell you if there’s anything wrong with it.

I wouldn’t want you to give up on Elixir because of a broken or incomplete ZIP file, i.e. a freaky accident.

braindeaf

braindeaf

Sorry problem solved I am a special kind of idiot. I had two zips on my Desktop.

thgraphs-code.zip
wwgraphql-code.zip

I was thinking ‘graph’. Thank you for your patience all :frowning:

RobL

Where Next?

Popular in Questions Top

Tee
can someone please explain to me how Enum.reduce works with maps
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New

We're in Beta

About us Mission Statement