rakeshtripathy

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

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

Where Next?

Popular in Questions Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement