Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p.164 player does not load video! Uncaught TypeError: _player2.default.init is not a function #49

Closed
nelsonic opened this issue Mar 5, 2017 · 1 comment

Comments

@nelsonic
Copy link
Member

nelsonic commented Mar 5, 2017

When trying to view a valid video url/id on page 164 of the Programming Phoenix book,
the video is not displaying.

When I open DevTools > Console I see the following error:

Uncaught TypeError: _player2.default.init is not a function

Screenshot:
image

Everything else appears to be working but the video is not being loaded.
I've tried searching the book's "errata" page: https://pragprog.com/titles/phoenix/errata
and spent some time googling for the error text and more generic keywords.

I suspect that the error is because we haven't said how the web page should get
get the YT script ... but I could be wrong.

If anyone else has come across this issue, please share how you resolved it! thanks! 👍

On a side note this type of is not a function error doesn't happen in Elm!
dwyl/technology-stack#27 (comment)

@nelsonic
Copy link
Member Author

nelsonic commented Mar 6, 2017

It was failing because I missed out the export default Player line.
see:

@nelsonic nelsonic closed this as completed Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant