Creating a custom package at a custom folder

I am trying to create my own custom package using PkgTemplates (Home · PkgTemplates.jl). I want the package files to be in my Dropbox folder to sync between my desktop and laptop.

I tried to use the dir option in the template by

julia> t1 = Template(user="roiholtzman", dir="~/Dropbox/src")

but then I got this error

julia> t1("MyExample")
[ Info: Running prehooks
[ Info: Running hooks
  Activating environment at `~/Dropbox/src/MyExample/Project.toml`
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `~/Dropbox/src/MyExample/Project.toml`
  No Changes to `~/Dropbox/src/MyExample/Manifest.toml`
┌ Error: Pkg.precompile error
│   exception =
│    IOError: pwd(): operation not permitted (EPERM)
│    Stacktrace:
│      [1] uv_error
│        @ ./libuv.jl:97 [inlined]
│      [2] pwd()
│        @ Base.Filesystem ./file.jl:59
│      [3] abspath(a::String)
│        @ Base.Filesystem ./path.jl:392
│      [4] iterate
│        @ ./generator.jl:47 [inlined]
│      [5] _collect(c::Vector{String}, itr::Base.Generator{Vector{String}, typeof(abspath)}, #unused#::Base.EltypeUnknown, isz::Base.HasShape{1})
│        @ Base ./array.jl:691
│      [6] collect_similar
│        @ ./array.jl:606 [inlined]
│      [7] map
│        @ ./abstractarray.jl:2294 [inlined]
│      [8] create_expr_cache(pkg::Base.PkgId, input::String, output::String, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, internal_stderr::IOBuffer, internal_stdout::Base.DevNull)
│        @ Base ./loading.jl:1228
│      [9] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOBuffer, internal_stdout::Base.DevNull)
│        @ Base ./loading.jl:1326
│     [10] (::Pkg.API.var"#215#242"{IOBuffer, String, Base.PkgId})()
│        @ Pkg.API /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1144
│     [11] with_logstate(f::Function, logstate::Any)
│        @ Base.CoreLogging ./logging.jl:491
│     [12] with_logger
│        @ ./logging.jl:603 [inlined]
│     [13] macro expansion
│        @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1143 [inlined]
│     [14] (::Pkg.API.var"#212#239"{Bool, Vector{Task}, Pkg.API.var"#handle_interrupt#231"{Base.Event, ReentrantLock, Base.TTY}, Pkg.API.var"#color_string#229", Base.Event, Base.Event, ReentrantLock, Vector{Base.PkgId}, Vector{Base.PkgId}, Dict{Base.PkgId, String}, Vector{Base.PkgId}, Vector{Base.PkgId}, Dict{Base.PkgId, Bool}, Dict{Base.PkgId, Base.Event}, Dict{Base.PkgId, Bool}, Dict{Base.UUID, Pkg.Types.PackageEntry}, Vector{Base.PkgId}, Bool, Base.TTY, Base.Semaphore, String, Vector{String}, Vector{Base.PkgId}, Base.PkgId})()
│        @ Pkg.API ./task.jl:411
└ @ Pkg.API /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1019
  Activating environment at `~/.julia/environments/v1.6/Project.toml`
[ Info: Running posthooks
[ Info: New package is at /Users/roiho/Dropbox/src/MyExample

What should I do to solve it?