Initialization Error
the-man-with-a-golden-mind opened this issue · comments
Hi, I have tried to use your google auth example from examples but I am getting:
`Error: Problem with the flags given to your Elm program on initialization.
Json.Decode.oneOf failed in the following 2 ways:
(1) Problem with the given value:
undefined
Expecting null
(2) Problem with the given value:
undefined
Expecting a LIST`
Elm version: 0.19.1
Seems like a problem unrelated to the library but with some missing flags when initializing the elm application.
main : Program (Maybe (List Int)) Model Msg
Looking at the examples, it seems that the actual index.html
and the initialization code is not committed on the master
branch :s .. but it is on the gh-pages
:
https://github.com/truqu/elm-oauth2/blob/gh-pages/google/implicit/index.html
As you can see, the examples expect either undefined or a list of bytes to be given as an argument:
const app = Elm.Main.init({
node: document.getElementById("app"),
flags: rememberedBytes()
});
I am not sure why the index.html
wasn't included, probably an oversight. Sorry!
Now versioned on master
.
I've also added some instructions about how to build and run the examples locally 👍