Need help on :mime compile time value not set error

I have upgraded mime to 2.0.3, and getting below error.

RUN mix compile
—> Running in 0e90b797e89a1
ERROR! the application :mime has a different value set for key :types during runtime compared to compile time. Since this application environment entry was marked as compile time, this difference can lead to different behaviour than expected:

  • Compile time value was not set
  • Runtime value was set to: %{“application/pdf” => [“pdf”], “application/vnd.mytest.v1+json” => [“api_v1_json”]}

To fix this error, you might:

  • Make the runtime value match the compile time one

  • Recompile your project. If the misconfigured application is a dependency, you may need to run “mix deps.compile mime --force”

  • Alternatively, you can disable this check. If you are using releases, you can set :validate_compile_env to false in your release configuration. If you are using Mix to start your system, you can pass the --no-validate-compile-env flag

Below is the config.ex file

config.ex

config :mime, :types, %{
“application/vnd.mytest.v1+json” => [“api_v1_json”],
“application/pdf” => [“pdf”]
}

This post might help you troubleshoot the issue: Validating compile/runtime configuration - ERROR! the application :backend has a different value set for key :basic_auth during runtime - #2 by wojtekmach

Alternatively, maybe the following from the docs might help (MIME — mime v2.0.5):

After adding the configuration, MIME needs to be recompiled. If you are using mix, it can be done with: mix deps.clean mime --build