PrimalHQ / primal-caching-service

Primal’s caching service for Nostr connects to the specified set of relays, collects all events in real time, stores them locally, and makes them available to nostr clients through a web socket-based API.
https://primal.net
MIT License
86 stars 13 forks source link

Issues while building the primal-caching-service #21

Closed abhay-raizada closed 7 months ago

abhay-raizada commented 7 months ago

building on a mac m1: commit: 2abb1e79c45

when i run the command: nix --extra-experimental-features flakes --extra-experimental-features nix-command develop -c sh -c '$start_primal_caching_service'

i get:

ERROR: LoadError: The following 1 direct dependency failed to precompile:

HTTP [cd3eb016-35fb-5094-929b-558a96fad6f3]

Error: Missing source file for HTTP [cd3eb016-35fb-5094-929b-558a96fad6f3
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /nix/store/y1ka00ja531d4mi804kj0ggvcynixz49-julia-bin-1.9.4/share/julia/stdlib/v1.9/Pkg/src/Types.jl:69
 [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
   @ Pkg.API /nix/store/y1ka00ja531d4mi804kj0ggvcynixz49-julia-bin-1.9.4/share/julia/stdlib/v1.9/Pkg/src/API.jl:1619
 [3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /nix/store/y1ka00ja531d4mi804kj0ggvcynixz49-julia-bin-1.9.4/share/julia/stdlib/v1.9/Pkg/src/API.jl:156
 [4] precompile(pkgs::Vector{Pkg.Types.PackageSpec})
   @ Pkg.API /nix/store/y1ka00ja531d4mi804kj0ggvcynixz49-julia-bin-1.9.4/share/julia/stdlib/v1.9/Pkg/src/API.jl:145
 [5] precompile(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /nix/store/y1ka00ja531d4mi804kj0ggvcynixz49-julia-bin-1.9.4/share/julia/stdlib/v1.9/Pkg/src/API.jl:171
 [6] precompile()
   @ Pkg.API /nix/store/y1ka00ja531d4mi804kj0ggvcynixz49-julia-bin-1.9.4/share/julia/stdlib/v1.9/Pkg/src/API.jl:162
 [7] top-level scope
   @ ~/Dev/test/primal-caching-service/pkg.jl:1
in expression starting at /Users/abhayraizada/Dev/test/primal-caching-service/pkg.jl:1

this is also the error i get inside the docker container when i run:

docker run -it --rm -v `pwd`:`pwd` -w `pwd` -p 8801:8801 -e PRIMALSERVER_HOST=0.0.0.0 nixos/nix nix --extra-experimental-features 'nix-command flakes' develop -c sh -c '$start_primal_caching_service'

can somebody help me with this?

pritk commented 7 months ago

hi, don't forget to clone git sub-modules too.

abhay-raizada commented 7 months ago

thanks, this solves it!