Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

"_U.list is not a function" When debugging with elm 0.16 #156

Closed
burabure opened this issue Nov 19, 2015 · 27 comments
Closed

"_U.list is not a function" When debugging with elm 0.16 #156

burabure opened this issue Nov 19, 2015 · 27 comments

Comments

@burabure
Copy link

Updated to 0.16 and now I'm getting this error when debugging, I think it's a runtime error and not a compile time one. Non debugging compiles and runs fine.

@jvoigtlaender
Copy link
Contributor

Are you sure that in addition to updating to 0.16, your ELM_HOME environment variable is also now pointing to 0.16's share directory, instead of still to 0.15's or 0.15.1's?

@burabure
Copy link
Author

I thought that ELM_HOME wasn't needed for 0.16 (or at least that was the idea). having to check and set it every time is a downer =(

Anyways changed it to ~/.nvm/versions/node/v4.2.1/lib/node_modules/elm/Elm-Platform/0.16.0/share and it's still giving me the same error

@fredcy
Copy link

fredcy commented Nov 19, 2015

I'm also seeing a fatal "not a function" error in javascript console when using the 0.16 elm reactor in debug mode. I don't have ELM_HOME set. Running in Mac OS X with 0.16 installed from package.

@fredcy
Copy link

fredcy commented Nov 19, 2015

Seems to be happening at debug.js:9560:26.

Elm.Native.Slider.make = function(localRuntime) {

@burabure
Copy link
Author

@fredcy I think you should try setting it. take a look at #131 (comment)

@fredcy
Copy link

fredcy commented Nov 19, 2015

I tried with ELM_HOME set (to /usr/local/share/elm) and I get the same error as before.

@jvoigtlaender
Copy link
Contributor

@burabure, I also thought that 0.16 would obviate ELM_HOME. But this morning I learned that this will only happen with the next release of elm-reactor, probably in 0.16.1.

@fredcy, what are the contents of your /usr/local/share/elm? Is there a file /usr/local/share/elm/reactor/_reactor/debug.js?

@burabure
Copy link
Author

@jvoigtlaender bummer =( Would uploading my code to a repo help you help me solving this error?

@jvoigtlaender
Copy link
Contributor

I'm not really an expert in elm-reactor things (apart from managing its build plan etc. in https://github.com/elm-lang/elm-platform). Maybe @vilterp knows what happened to _U, specifically.

@fredcy
Copy link

fredcy commented Nov 19, 2015

Looks like a semi-colon is missing at debug.js:9637, the end of the Elm.Native.Slider.make function.

@burabure
Copy link
Author

@fredcy looks fine to me

return localRuntime.Native.Slider.values = {
        slider: F2(slider)
    };

@fredcy
Copy link

fredcy commented Nov 19, 2015

If I patch debug.js to add that semicolon I get past the fatal "not a function" error.

But then I get an error about "up.props is undefined" appearing in the right pane of the reactor window. That's happening in the customButton() function.

https://github.com/elm-lang/core/issues/438

@jvoigtlaender
Copy link
Contributor

@evancz, it seems elm-reactor as shipped with 0.16 is broken in debug mode.

@tcoopman
Copy link

I have the same error, installed 0.16 from npm on linux

@zilvinasu
Copy link

Same problem with 0.16 on Mac OS X

@tcoopman
Copy link

It looks like someone also has the problem with http://elm-lang.org/try: https://www.reddit.com/r/elm/comments/3tg8es/016_compiler_problem/

@evancz
Copy link
Contributor

evancz commented Nov 20, 2015

There is a new version of elm-reactor that is a ton better, so I am just going to focus on getting that ready real quick. There may be a week or two in the meantime, but if you are able to start tracking down the root issues here please do a PR and @ mention me.

@flip111
Copy link

flip111 commented Nov 20, 2015

@evancz what are the new features and/or improvements in the new version of the elm-reactor?

@jvoigtlaender
Copy link
Contributor

@flip111, why is that relevant at this point? Isn't it more useful to get it fixed and released as soon as possible (then with a blog post advertising the improvements) than taking time now to detail the improvements here and now, for a limited audience?

@flip111
Copy link

flip111 commented Nov 20, 2015

it's not relevant, i was just curious ... perhaps there is a list somewhere already

@jvoigtlaender
Copy link
Contributor

There are for sure discussions (and, if I remember correctly, mock ups of the UI) on one of the mailing lists.

fredcy added a commit to fredcy/elm-reactor that referenced this issue Nov 20, 2015
This addresses the immediate symptom reported in elm-lang#157 and potentially in elm-lang#156.
@evancz
Copy link
Contributor

evancz commented Nov 22, 2015

So the root here was that ELM_HOME is still needed? If so, let's close it. This is going to be fixed in the next release of the platform, it cannot be done as a patch.

@burabure
Copy link
Author

it was the missing semicolon that 6db89d0 solved, so we can close this =)

@evancz evancz closed this as completed Nov 23, 2015
@evancz
Copy link
Contributor

evancz commented Nov 23, 2015

Cool, thanks for the report and for letting us know what happened in the end!

@milanvdm
Copy link

I still have this problem.

@jvoigtlaender
Copy link
Contributor

@milanvdm, still? Have you re-installed 0.16 and the core package after Evan's fix?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants