문제

I follow these steps:

  1. Run swank-js in the command line.
  2. Run emacs.
  3. M-x slime-connect.
  4. Host: 127.0.0.1; Port: 4005
  5. Open up the http://localhost:8009/swank-js/test.html in Firefox.
  6. Receive: "Remote attached: (browser) Firefox14.0" in the emacs REPL.
  7. Run the command "document" in the REPL.

At this point, I receive the error:

ReferenceError: document is not defined
    at repl:1:1
    at DefaultRemote.evaluate (/usr/lib/nodejs/swank-js/swank-handler.js:314:9)
    at Executive.listenerEval (/usr/lib/nodejs/swank-js/swank-handler.js:414:21)
    at Handler.receive (/usr/lib/nodejs/swank-js/swank-handler.js:169:20)
    at SwankParser.onMessage (/usr/lib/nodejs/swank-js/swank.js:50:17)
    at SwankParser.handleMessage (/usr/lib/nodejs/swank-js/swank-protocol.js:75:8)
    at SwankParser.handleContent (/usr/lib/nodejs/swank-js/swank-protocol.js:62:10)
    at SwankParser.execute (/usr/lib/nodejs/swank-js/swank-protocol.js:53:20)
    at Socket.<anonymous> (/usr/lib/nodejs/swank-js/swank.js:60:16)
    at Socket.emit (events.js:67:17)

Should I be using require() or something? I'm still a bit hazy how swank/slime/node are communicating so please forgive the black box nature of this question. :D

도움이 되었습니까?

해결책

Judging by the bug report at https://github.com/swank-js/swank-js/issues/49#issuecomment-8079040, I'd guess you aren't loading the slime-js component.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top