IdiosApps

IdiosApps

Programming Phoenix LiveView: P69 - module Pento.Catalog.Product is not available

In my terminal, I am trying this with the source code from the .zip (the repo where I was going from scratch also wasn’t working - similar error).
I suspect it’s a user error, but the files are there is reasonable stuff like defmodule Pento.Catalog.Product do. Maybe my Elixir install is bad?

C:\Users\me\pento_examples\generators\pento>iex
Interactive Elixir (1.14.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> ls
.formatter.exs     .gitignore         assets             config             lib
mix.exs            mix.lock           priv               test
iex(2)> alias Pento.Catalog.Product
Pento.Catalog.Product
iex(3)> exports Product
** (UndefinedFunctionError) function Pento.Catalog.Product.module_info/1 is undefined (module Pento.Catalog.Product is not available)
    Pento.Catalog.Product.module_info(:exports)
    (iex 1.14.1) lib/iex/autocomplete.ex:138: IEx.Autocomplete.exports/1
    (iex 1.14.1) lib/iex/helpers.ex:736: IEx.Helpers.exports/1
    iex:3: (file)
iex(3)> 

I tried Catalog too, and that got the same kind of error.

Even on page 45 I hit an issue:

iex(1)> alias Pento.Accounts
Pento.Accounts
iex(2)> export Accounts
** (CompileError) iex:2: undefined function export/1 (there is no such import)

I had a Google but couldn’t see an answer that looked like it’d work for me.
Any help would be really appreciated, so I can continue making progress with the book!

Most Liked

SophieDeBenedetto

SophieDeBenedetto

Author of Programming Phoenix LiveView

Hi there! You need to run an IEx session that loads up the application. So not iex but iex -S mix

Where Next?

Popular Pragmatic Bookshelf topics Top

jimschubert
In Chapter 3, the source for index introduces Config on page 31, followed by more code including tests; Config isn’t introduced until pag...
New
iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
edruder
I thought that there might be interest in using the book with Rails 6.1 and Ruby 2.7.2. I’ll note what I needed to do differently here. ...
New
raul
Page 28: It implements io.ReaderAt on the store type. Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt? ...
New
joepstender
The generated iex result below should list products instead of product for the metadata. (page 67) iex> product = %Product{} %Pento....
New
jeremyhuiskamp
Title: Web Development with Clojure, Third Edition, vB17.0 (p9) The create table guestbook syntax suggested doesn’t seem to be accepted ...
New
gilesdotcodes
In case this helps anyone, I’ve had issues setting up the rails source code. Here were the solutions: In Gemfile, change gem 'rails' t...
New
dachristenson
I just bought this book to learn about Android development, and I’m already running into a major issue in Ch. 1, p. 20: “Update activity...
New
dachristenson
I’ve got to the end of Ch. 11, and the app runs, with all tabs displaying what they should – at first. After switching around between St...
New

Other popular topics Top

ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
PragmaticBookshelf
A PragProg Hero’s Journey with Brian P. Hogan @bphogan Have you ever worried that your only legacy will be in the form of legacy...
New
AstonJ
Or looking forward to? :nerd_face:
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
AstonJ
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New

Sub Categories: