Stuck on Phoenix LiveView installation in my app - npm ERR! code ENOLOCAL

Hi,
I am totally newbie in Elixir/Phoenix.

I have been trying to follow a LiveView tutorial, and I am stuck in the installation procedure of LiveView, as per

I think I followed the steps fully, and after:
npm install --prefix assets

… I get the following error:

npm ERR! code ENOLOCAL
npm ERR! Could not install from “deps/phoenix_live_view” as it does not contain a package.json file.

In fact, the folder deps/phoenix_live_view does not exist.
Does it have to be downloaded before the npm install, or it should be downloaded by the npm install?

Thanks for any help.

Gustavo.

For downloading dependencies of your mix project you’d need to run mix deps.get. Then deps/phoenix_live_view should be populated if you have added liveview as the dependency.

2 Likes

Ups! I did not see the “mix deps.get” step.

Problem solved!

Thanks!