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

Problem with setting up LightTable connection for tutorial #82

Closed
kevinrobinson opened this issue Jan 29, 2014 · 2 comments
Closed

Problem with setting up LightTable connection for tutorial #82

kevinrobinson opened this issue Jan 29, 2014 · 2 comments

Comments

@kevinrobinson
Copy link

Not sure where the best place to post this, but figured I'd start here since having an awesome Om and ClojureScript tutorial experience is so important!

Following the tutorial, I add a connection to a Browser (External), grab the script tag, paste it inside the body tag of index.html. I opened the local file in Chrome, open web inspector, and refresh.

I don't see the XHR finished loading... message on the console, but I can see the request for ws.js succeeds and that code runs. I can also see the socket.io connection is opened successfully, with the init message is sent and heartbeat messages being set back and forth.

5:::{
  "name": "init",
  "args": [
    {
      "name": "localhost",
      "types": [
        "js",
        "css",
        "html"
      ],
      "commands": [
        "editor.eval.js",
        "editor.eval.cljs.exec",
        "editor.eval.html",
        "editor.eval.css"
      ]
    }
  ]
}

Being optimistic, and since I don't see a console.log in the ws.js code, I also tried to eval a line in core.cljs to update the atom as in the tutorial. When I try to evaluate with cmd+enter, LightTable UI looks like it's connecting:

screen shot 2014-01-28 at 10 40 28 pm

(FWIW, I've used your awesome https://github.com/swannodette/lt-cljs-tutorial with no problems).

But then I get this error message in LightTable.

We couldn't connect.

Looks like there was an issue trying to connect to the project. Here's what we got:

Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cljs/*cljs-warn-on-undeclared* in this context, compiling:(lighttable/hub/clj/eval.clj:218:7)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)

Anyone experience anything similar, or have insight as to whether this is a LightTable bug or something I'm not setting up correctly here? Thanks!

@haywoood
Copy link

It worked for me, I also was thrown off by not seeing the xhr message in the JS console. I didn't modify the code, just pasted the swap statement at the end of the file and cmd+entered it and it worked (after taking a minute to connect)

@swannodette
Copy link
Member

I clarified the XHR bit in the tutorial, the latter part is not something I've heard, probably best to take up with LT users.

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

No branches or pull requests

3 participants