Running Julia script with predefined environment

Julia newbie here. I downloaded a package with Project.toml and instantiated the environment in Julia interactively so all deps were installed. Now I need to run a script (here, testing.jl) thru command line in this environment. Is this the correct usage?

julia --project=envName testing.jl

envName is the name I declared for the project. I am still getting ERROR: LoadError: UndefVarError: for some methods, while I know that the corresponding packages have been installed. Would appreciate any help.

There is probably some error in your code, but it is hard to be more specific without an MWE.

I see - I’ll look into it. Is the syntax correct though? I just want to make sure of that. Thanks!

If envName is a valid project directory then that part should work.