I can't run loopback project with spy-js

181 views
Skip to first unread message

王硕

unread,
Nov 2, 2015, 9:15:16 PM11/2/15
to LoopbackJS
WebStorm supports a feature called spy-js, I'm not familiar of this tech. but anyway, I try to run a lb project with it, it always crash with following error:

```
/usr/local/bin/node /Applications/WebStorm.app/Contents/plugins/spy-js/server/spyNode.js --spyJsServerPort=3547 --spyJsTracedApp=/Users/clark/WebstormProjects/uce-api-server/server/server.js --spyJsChildProc=false
info: socket.io started
spy-js has started
session store: /var/folders/6r/pys301fn5rj7q6svp346v7jh0000gn/T/spy-js-session115103-59288-1vl2e07
session (xx7fv): new session created: xx7fv
session (xx7fv): dynamic config created: /var/folders/6r/pys301fn5rj7q6svp346v7jh0000gn/T/115103-59288-1eji37r.js
session (xx7fv): ----------- Starting traced application process (59288) -----------
session (xx7fv): Unexpected token ILLEGAL
SyntaxError: Unexpected token ILLEGAL
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:414:25)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/Users/clark/WebstormProjects/uce-api-server/node_modules/loopback/node_modules/loopback-phase/lib/phase.js:22:41)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
```
You can try spy-js on a fresh lb project, it's always the same error.

Does anyone have an idea of how spy-js work with loopback?

Raymond Feng

unread,
Nov 2, 2015, 11:46:22 PM11/2/15
to loopb...@googlegroups.com
Can you open /var/folders/6r/pys301fn5rj7q6svp346v7jh0000gn/T/115103-59288-1eji37r.js? It seems that generated JS has invalid syntax.

Thanks,

---
Raymond Feng
Co-Founder and Architect @ StrongLoop, Inc. (An IBM Company)

StrongLoop makes it easy to develop APIs in Node, plus get DevOps capabilities like monitoring, debugging and clustering.

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/62d74e87-ca32-419d-9f9f-6053f7efdb04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Clark

unread,
Nov 3, 2015, 3:22:16 AM11/3/15
to loopb...@googlegroups.com
irreverent. It's a spy-js configuration file. I can launch an express app with spy-js, same file is generated either (different path only).


--
You received this message because you are subscribed to a topic in the Google Groups "LoopbackJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loopbackjs/JJpJy-pRKLo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/9FF4D561-75F9-47AA-BBDE-0996B862A2C9%40strongloop.com.

王硕

unread,
Nov 23, 2015, 4:49:59 AM11/23/15
to LoopbackJS
Confirmed as a bug of WebStorm 11. See https://youtrack.jetbrains.com/issue/WEB-18987

在 2015年11月3日星期二 UTC+8下午4:22:16,王硕写道:
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "LoopbackJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loopbackjs/JJpJy-pRKLo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loopbackjs+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages