Phoenix_live_view: Missing test dependency Floki

Created on 18 Sep 2019  路  6Comments  路  Source: phoenixframework/phoenix_live_view

Environment

  • Elixir version (elixir -v): 1.9.1
  • Phoenix version (mix deps): 1.4.10
  • NodeJS version (node -v): v11.15.0
  • NPM version (npm -v): 6.7.0
  • Operating system: Debian GNU/Linux 9.9 (stretch)

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.

All 6 comments

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.

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? 馃

I ended up doing that, yeah..

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

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

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)

Was this page helpful?
0 / 5 - 0 ratings