Question
Using the nodejs v.6.7 with faye v.7.1 I am getting error
/path/livestats/node_modules/faye0.7/faye.js:18
ID_LENGTH: <%= Faye::ID_LENGTH %>,
^
-----------------------
Exception: SyntaxError: Unexpected token <
SyntaxError: Unexpected token <
at Module._compile (module.js:427:25)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object.<anonymous> (/path/livestats/lib/livestats.js:4:12)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
-----------------------
I am trying to implement example showing in peepcode's Meet node.js video.
Solution
Seems like you requiring faye.js
as is before building faye_node
.
You need to follow instructions on faye repository or installing it via npm
:
npm install faye -d
If you install it via NPM you can require("faye-node")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow