phoenixframework / phoenix_live_view

Rich, real-time user experiences with server-rendered HTML
https://hex.pm/packages/phoenix_live_view
MIT License
6.22k stars 931 forks source link

Missing test dependency Floki #364

Closed isavita closed 5 years ago

isavita commented 5 years ago

Environment

Actual behavior

Since upgraded phoenix_live_view to version 0.2.1. I am getting the following missing dependency error

 ** (UndefinedFunctionError) function Floki.find/2 is undefined (module Floki is not available)

Adding to mix.exs file Floki resolved the issue

{:floki, "~> 0.23.0", only: :test}

Is Floki missing from the 0.2.1 release depedncies?

Expected behavior

To not need to explicitly add Floki to project mix.exs file.

coladarci commented 5 years ago

Sorry to comment on a closed issue - I was expecting for this to be resolved w/ the latest release, but am still seeing the error:

** (UndefinedFunctionError) function Floki.find/2 is undefined (module Floki is not available)

This smells of user error on my end - but my lock file says "phoenix_live_view": {:hex, :phoenix_live_view, "0.3.1", "5474c9e70db4e5bb23c1d1200d9a119ee76b927f3352554d31f5f31eaa1ea568",, I've cleared build caches, cleaned deps, etc and keep getting the above.

feliperenan commented 5 years ago

I'm also facing this issue after updating from 0.2.0 to 0.3.1, I'm not sure if it's still an issue or I'm missing something. Did you guys still need to add floki as dependency to get tests working? 🤔

coladarci commented 5 years ago

I ended up doing that, yeah..

dlederle commented 4 years ago

I'm still seeing this on 0.4.1. Fixed by adding {:floki, "~> 0.23.0", only: :test} to deps.

snewcomer commented 4 years ago

@dlederle Just to confirm, did you see this when running tests or in dev?

woolfred commented 4 years ago

Had a similar Floki related problem using live_view 0.7.1. and running tests. For my first test, which uses live_isolated, I got function Floki.parse document/1 is undefined (module Floki is not available)