Can't call functions from Makie

I am trying to follow along with the Basic Tutorial on the Makie webpage. I have Makie, GLMakie and CairoMakie installed. I tried running the following code:

using CairoMakie
F = Figure(backgroundcolor = :tomato)

Which generates these error messages:

ERROR: MethodError: no method matching return_type(::Makie.var"#30#32"{Set{Makie.Mouse.Button}}, ::Tuple{DataType})

Closest candidates are:
  return_type(::Any, ::DataType)
   @ Core compiler\typeinfer.jl:1109
  return_type(::Any, ::DataType, ::UInt64)
   @ Core compiler\typeinfer.jl:1115

Stacktrace:
 [1] _sanitize_observer_function(f::Any, argtypes::Tuple{DataType})
   @ Makie C:\Users\foxda\.julia\packages\Makie\c5WJV\src\interaction\PriorityObservable.jl:82
 [2] on(f::Any, observable::Makie.PriorityObservable{Makie.MouseButtonEvent}; weak::Bool, priority::Int8)
   @ Makie C:\Users\foxda\.julia\packages\Makie\c5WJV\src\interaction\PriorityObservable.jl:100
 [3] on
   @ C:\Users\foxda\.julia\packages\Makie\c5WJV\src\interaction\PriorityObservable.jl:99 [inlined]
 [4] Events()
   @ Makie C:\Users\foxda\.julia\packages\Makie\c5WJV\src\types.jl:109
 [5] Scene(; clear::Bool, transform_func::Function, scene_attributes::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:camera, :backgroundcolor), Tuple{typeof(campixel!), Symbol}}})
   @ Makie C:\Users\foxda\.julia\packages\Makie\c5WJV\src\scenes.jl:135
 [6] Figure(; kwargs::Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:backgroundcolor,), Tuple{Symbol}}})
   @ Makie C:\Users\foxda\.julia\packages\Makie\c5WJV\src\figures.jl:70
 [7] top-level scope
   @ REPL[20]:1

Any help with this would be greatly appreciated!

Edit: I am using windows 10 and Julia version 1.9.2. I originally installed the CairoMakie package on jupyter. Afterwards I installed it using the julia console.

This works for me on Linux. Can you provide more information about your environment?

julia> using CairoMakie
[ Info: Precompiling CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0]

julia> F = Figure(backgroundcolor = :tomato)
Figure()

julia> versioninfo()
Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, ivybridge)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_REVISE_INCLUDE = 1
  JULIA_IMAGE_THREADS = 1

(jl_MzNuOr) pkg> st
Status `/tmp/jl_MzNuOr/Project.toml`
  [13f3f980] CairoMakie v0.10.6

(jl_MzNuOr) pkg>

@bitVil Can you tell me how you had installed CairoMakie and GLMakie?

julia> using Pkg
julia> Pkg.add(“GLMakie”)

… or you can enter the package manager (which I prefer, and I feel is more reliable)

julia> ] <— yes, it’s just a right bracket… then use backspace to leave the package manager when done

(@v1.9) pkg> add CairoMakie

      .... a lot of stuff will happen here... downloading, installing compiling
      .... a lot of stuff will happen here... downloading, installing compiling
      .... a lot of stuff will happen here... downloading, installing compiling

(@v1.9) pkg> ::: now press backspace to exit package mgr:::

julia>

I am using windows 10 and julia version 1.9.2. I tried running the code in the julia console and jupyter, but got the same error message for both.

Can you show what’s in your Julia environment, the output of ] st?