Sandeep-Suthar9467
Issue upgrading - cannot define module Phoenix.View because it is currently being defined in
**Elixir Version:** 1.13.4
**Erlang/OTP Version:** 24.3.4.4
**Phoenix Version (Before Upgrade):**
- {:phoenix, "~> 1.6.0"}
- {:phoenix_html, "~> 3.0"}
- {:phoenix_live_dashboard, "~> 0.5"}
**Phoenix Version (After Upgrade):**
- {:phoenix, "~> 1.6.16"}
- {:phoenix_html, "~> 3.2"}
- {:phoenix_live_dashboard, "~> 0.6"}
Steps to Reproduce:
Afrer upgrading to Phoenix dependencies in mix.exs:
elixir defp deps do [ {:phoenix, "~> 1.6.16"}, {:phoenix_html, "~> 3.2"}, {:phoenix_live_dashboard, "~> 0.6"}, # other dependencies ] end
I have actually ran the following commands in order to try and fix the error.
```bash
mix deps.clean --all
mix deps.get
```
& I have attempted to compile the project using the follow mix command, but I am receiving issues.
bash mix compile
Expected Behavior:
The project should compile successfully without errors.
Actual Behavior:
The following compilation error occurs:
== Compilation error in file lib/phoenix_view.ex ==
** (CompileError) lib/phoenix_view.ex:1: cannot define module Phoenix.View because it is currently being defined in lib/phoenix/view.ex:1
(elixir 1.13.4) lib/kernel/parallel_compiler.ex:346: anonymous fn/5 in Kernel.ParallelCompiler.spawn_workers/7
could not compile dependency :phoenix_view, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile phoenix_view", update it with "mix deps.update phoenix_view" or clean it with "mix deps.clean phoenix_view"
Reason for Upgrade:
I am upgrading the Phoenix version to address a security vulnerability in wildcard check_origin configurations.
I would appreciate any guidance or suggestions to resolve this issue. Thank you for your help!
Marked As Solved
benwilson512
Usually things like gitlab.yml have a way of caching some of the build artifacts between runs, to help improve compilation time. In this case you want to make sure to clear out that cache or else you’ll have the same issue.
If you can show as much of that file as possible that’s probably a good idea.
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
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








