felixlu / jap

Automatically exported from code.google.com/p/jap
0 stars 0 forks source link

JAP_WS_LOCAL_NODE requirements ? #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.deploy openshift node
2.run node JAP_WS_LOCAL.js

What is the expected output? What do you see instead?
$ node JAP_WS_LOCAL.js

module.js:340
    throw err;
          ^
Error: Cannot find module 'websocket'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/billy/Downloads/jap-master/JAP_WS_LOCAL_NODE/JAP/JAP_WS_LOCAL.js:16:17)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)

What version of the product are you using? On what operating system?
JAP_WS_REMOTE_NODE_OPENSHIFT-2.0.0-SNAPSHOT.zip
JAP_WS_LOCAL_NODE-2.0.0-SNAPSHOT.zip
OS:Archlinux

Please provide any additional information below.
According to package.json, remote server dependencies include websocket 
downloaded from your github rep.So what about the local client?

Original issue reported on code.google.com by westmin...@gmail.com on 27 Feb 2013 at 4:37

GoogleCodeExporter commented 8 years ago
My way to fix it:

1.copy the file 'package.json' in the folder 'JAP_WS_REMOTE_NODE_OPENSHIFT' to 
the folder 'JAP_WS_LOCAL_NODE'
$ cp ../JAP_WS_REMOTE_NODE_OPENSHIFT/package.json .

2.in terminal run 'npm install'(need nodejs package)
$ npm install

3.run node JAP_WS_LOCAL.js
$ node JAP_WS_LOCAL.js

Original comment by westmin...@gmail.com on 27 Feb 2013 at 5:07

GoogleCodeExporter commented 8 years ago
JAP_WS_LOCAL/REMOTE_NODE uses a fork of 
https://github.com/Worlize/WebSocket-Node
To install that fork, you have to execute NM.bat (see README.txt)
Your fix also works! :)

Original comment by jeroen.v...@gmail.com on 27 Feb 2013 at 6:52

GoogleCodeExporter commented 8 years ago
Oh Sorry.I always ignore bat files as using linux for a long time.You can close 
this issue.

Original comment by westmin...@gmail.com on 28 Feb 2013 at 12:40