Porting precreated Phoenix app to another server creates error

I created a phoenix app that runs on my local machine.
I am in the process of porting it to another server and when I run it - I get an error.
I will go over what I did and then show the error.

I installed Elixir, Erlang , Phoenix and Postgres on the new server. Elixir and Erlang are installed with ASDF. They both are installed and work fine via their respective terminal outputs.

I installed Phoenix with no problem.

I configured the postgres credentials needed and when I create a new Phoenix app I don’t get errors.

I created a new GREEFIELD Phoenix app on the NEW server and it works perfect.

I fired up an FTP, dragged my precreated phoenix app to the new server.

I ran mix deps.get
I ran mix ecto.create
I ran mix ecto.migrate

Everything went fine.

I ran mix phx.server and I get the error that I usually get when I have a hanging process.
This time I don’t have a hanging process. I want to know what it might be. I am using the same port values as my Greenfield app. My Greenfield app is not running. I tried changing the port values on my precreated app and I get the same error.



** (Mix) Could not start application esbuild: exited in: Esbuild.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (ErlangError) Erlang error: :eacces:

  * 1st argument: invalid port name

            :erlang.open_port({:spawn_executable, '/home/wturner/sandbox/testbed/app/_build/esbuild-linux-x64'}, [:use_stdio, :exit_status, :binary, :hide, {:args, ["--version"]}])
            (elixir 1.14.3) lib/system.ex:1071: System.do_cmd/3
            (esbuild 0.6.1) lib/esbuild.ex:148: Esbuild.bin_version/0
            (esbuild 0.6.1) lib/esbuild.ex:75: Esbuild.start/2
            (kernel 8.4) application_master.erl:293: :application_master.start_it_old/4

Why might this be?

did you also copy _build and deps directories? What if you delete them and try

mix deps.get + compile

I know this is not what you are asking, but overall after development on a local machine it’s recommended to build a release, deploy it to server and run the release there. Also check out Deploying with Releases — Phoenix v1.7.1

This is perfect. I was wondering if there was a process like that. I figured uploading it to the server and redoing deps.get etc was good enough. I was wrong.

Thanks again!