GenieFramework / GenieBuilder.jl

Other
16 stars 1 forks source link

Package GenieBuilder not found in current path. #57

Closed hbonnavaud closed 1 year ago

hbonnavaud commented 1 year ago

Hi, I cannot start a genie server due to this error :

ERROR: ArgumentError: Package GenieBuilder not found in current path.
- Run `import Pkg; Pkg.add("GenieBuilder")` to install the GenieBuilder package.
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1630 [inlined]
 [2] macro expansion
   @ ./lock.jl:267 [inlined]
 [3] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1611
ERROR: LoadError: failed process: Process(setenv(`julia --startup-file=no --banner=no --depwarn=no -e '
      using Pkg;
      Pkg._auto_gc_enabled[] = false;
      Pkg.activate("."; io = devnull);
      Pkg.update(; io = devnull);
;

I added "import Pkg; Pkg.add("GenieBuilder")" to the rungb.jl file, but then I have another error:

ERROR: LoadError: The following package names could not be resolved:
 * GenieBuilder (not found in project, manifest or registry)
   Suggestions: GenieBuiltLifeProto
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/Types.jl:69
  [2] ensure_resolved(ctx::Pkg.Types.Context, manifest::Pkg.Types.Manifest, pkgs::Vector{Pkg.Types.PackageSpec}; registry::Bool)
    @ Pkg.Types /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/Types.jl:1003
  [3] ensure_resolved
    @ /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/Types.jl:954 [inlined]
  [4] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/API.jl:264
  [5] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/API.jl:156
  [6] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/API.jl:145
  [7] #add#25
    @ /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/API.jl:144 [inlined]
  [8] add
    @ /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/API.jl:144 [inlined]
  [9] #add#24
    @ /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/API.jl:143 [inlined]
 [10] add(pkg::String)
    @ Pkg.API /snap/julia/86/share/julia/stdlib/v1.9/Pkg/src/API.jl:143
 [11] top-level scope
    @ ~/.vscode/extensions/geniebuilder.geniebuilder-0.4.11/scripts/rungb.jl:4
in expression starting at /home/disc/h.bonnavaud/.vscode/extensions/geniebuilder.geniebuilder-0.4.11/scripts/rungb.jl:4

I am using GenieBuilder v0.4.11, on ubuntu 20.04, and julia 1.9.3.

The wired thing is that I was able to create a genie app using

:~/$ julia
julia> using Pkg
julia> Pkg.add("Genie")
julia> Genie.Builder.newapp("MyApp")

And to start the server using

:~/MyApp/$ bin/repl
julia> up()

And everything work well. But I when I use the interface of the VSCode plugin and try to start the server using the "start server" button, I get the error above, and I am then not able to load the editor.

Thanks a lot

DiracM commented 8 months ago

I no longer have this problem after a fresh installation but the steps that I took was:

Download the GitHub repository as a .zip Extract it to a path as for example "C:\GenieBuilder" Open Julia and type "]dev C:\GenieBuilder" to enter the package mode and add the new directory to the environment Hopefully the package should be now detected when you try to open Genie Builder