rakeshtripathy
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”]
}
Most Liked
muelthe
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.7):
After adding the configuration, MIME needs to be recompiled. If you are using mix, it can be done with:
mix deps.clean mime --build
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









