BeaconCMS/beacon

Heroicons Conflicts

kyleboe opened this issue · 1 comments

Env

  • Elixir Version (elixir -v): Elixir 1.16.0 (compiled with Erlang/OTP 26)
  • Phoenix Version (mix phx.new --version): 1.7.11
  • Platform: macOS 14.3 (23D56)

Issue

After initializing a new Phoenix project (mix phx.new --install my_app) and adding the dependency as outlined in the installation instructions, when running mix deps.get I am presented with the following error message:

Dependencies have diverged:
* heroicons (https://github.com/tailwindlabs/heroicons.git - v2.1.1)
  the dependency heroicons in mix.exs is overriding a child dependency:

  > In mix.exs:
    {:heroicons, [env: :prod, git: "https://github.com/tailwindlabs/heroicons.git", tag: "v2.1.1", sparse: "optimized", app: false, compile: false, depth: 1]}

  > In deps/beacon/mix.exs:
    {:heroicons, "~> 0.5", [env: :prod, hex: "heroicons", repo: "hexpm"]}

  Ensure they match or specify one of the above in your deps and set "override: true"
** (Mix) Can't continue due to errors on dependencies

And if you replace the :heroicons dependency definition auto-generated by phx.new with the dependency outlined in deps/beacon/mix.exs:

{:heroicons, "~> 0.5"}

When attempting to compile and run the server, the following error is encountered:

Error: ENOENT: no such file or directory, scandir '/my_site/deps/heroicons/optimized/24/outline'
    at Object.readdirSync (node:fs:1405:3)
    at Object.readdirSync (pkg/prelude/bootstrap.js:1309:35)
    at /my_site/assets/tailwind.config.js:46:12
    at Array.forEach (<anonymous>)
    at /my_site/assets/tailwind.config.js:45:13
    at registerPlugins (/snapshot/tailwindcss/lib/lib/setupContextUtils.js:799:61)
    at createContext (/snapshot/tailwindcss/lib/lib/setupContextUtils.js:1201:5)
    at createContext (/snapshot/tailwindcss/lib/processTailwindFeatures.js:46:61)
    at Object.getContext (/snapshot/tailwindcss/lib/cli/build/plugin.js:207:24)
    at /snapshot/tailwindcss/lib/cli/build/plugin.js:254:38 {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/my_site/deps/heroicons/optimized/24/outline'
}
** (Mix) `mix tailwind my_site` exited with 1

Resolved by 1fc258e