ERROR: LoadError: could not find project file (Project.toml or JuliaProject.toml) in package at `/Users` maybe `subdir` needs to be specified

ERROR: LoadError: could not find project file (Project.toml or JuliaProject.toml) in package at /Users maybe subdir needs to be specified

What command causes this error? Can you provide context to the problem?

Julia a.jl

Stacktrace:

[1] **pkgerror(**msg::String**)**

@ Pkg.Types /opt/homebrew/Cellar/julia/1.9.0/share/julia/stdlib/v1.9/Pkg/src/Types.jl:69

[2] **resolve_projectfile!(**env::Pkg.Types.EnvCache, pkg::Pkg.Types.PackageSpec, project_path::String**)**

@ Pkg.Types /opt/homebrew/Cellar/julia/1.9.0/share/julia/stdlib/v1.9/Pkg/src/Types.jl:822

[3] **handle_repo_develop!(**ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec, shared::Bool**)**

@ Pkg.Types /opt/homebrew/Cellar/julia/1.9.0/share/julia/stdlib/v1.9/Pkg/src/Types.jl:593

[4] **handle_repos_develop!(**ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, shared::Bool**)**

@ Pkg.Types /opt/homebrew/Cellar/julia/1.9.0/share/julia/stdlib/v1.9/Pkg/src/Types.jl:668

[5] **develop(**ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; shared::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}}**)**

@ Pkg.API /opt/homebrew/Cellar/julia/1.9.0/share/julia/stdlib/v1.9/Pkg/src/API.jl:211

[6] **develop(**pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}**)**

@ Pkg.API /opt/homebrew/Cellar/julia/1.9.0/share/julia/stdlib/v1.9/Pkg/src/API.jl:156

[7] **develop(**pkgs::Vector{Pkg.Types.PackageSpec}**)**

@ Pkg.API /opt/homebrew/Cellar/julia/1.9.0/share/julia/stdlib/v1.9/Pkg/src/API.jl:145

[8] **develop(**; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::String, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}**)**

@ Pkg.API ./boot.jl:0

[9] top-level scope

@ ~/a.jl:12

10Pkg.activate(; temp=true)
11Pkg.add([“Gtk4”, “Colors”, “FixedPointNumbers”])
12Pkg.develop(path=metal_dir)

What is the value of metal_dir and do you actually have a package there?

no I just copy the jl file and toml file

From your error message it looks like the value of metal_dir is "/Users" (and it doesn’t find a Project.toml there). Is that what you intend it to be?

ok i understand this metal_dir is outer dir so there is no toml
thats why i directly git clone code can run
thank you so much !