Advertisement
Guest User

Untitled

a guest
Jun 29th, 2012
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. Strange node.js error: TypeError: Object #<Object> has no method 'on'
  2. TypeError: Object #<Object> has no method 'on'
  3. at Object.<anonymous> (/Users/avishai/Downloads/anismiles-jsdom-based-screen-scraper-f0c79d3/searcher-server.js:9:10)
  4. at param (/Users/avishai/.node_libraries/.npm/connect/0.5.10/package/lib/connect/middleware/router.js:146:21)
  5. at param (/Users/avishai/.node_libraries/.npm/connect/0.5.10/package/lib/connect/middleware/router.js:157:15)
  6. at pass (/Users/avishai/.node_libraries/.npm/connect/0.5.10/package/lib/connect/middleware/router.js:162:10)
  7. at Object.router [as handle] (/Users/avishai/.node_libraries/.npm/connect/0.5.10/package/lib/connect/middleware/router.js:168:6)
  8. at next (/Users/avishai/.node_libraries/.npm/connect/0.5.10/package/lib/connect/index.js:218:15)
  9. at Server.handle (/Users/avishai/.node_libraries/.npm/connect/0.5.10/package/lib/connect/index.js:231:3)
  10. at Server.emit (events.js:45:17)
  11. at HTTPParser.onIncoming (http.js:1078:12)
  12. at HTTPParser.onHeadersComplete (http.js:87:31)
  13.  
  14. function books(app){
  15. app.get('/:query', function(req, res, next) {
  16.  
  17. res.writeHead(200, { 'Content-Type': 'text/html' });
  18.  
  19. var rediff = require('./searcher-rediff');
  20. rediff.on('on_book', function(item){
  21. res.write(item + "<br/>");
  22. });
  23. rediff.on('completed', function(){
  24. res.end();
  25. });
  26. rediff.search(escape(req.params.query));
  27.  
  28. });
  29. }
  30.  
  31. SyntaxError: Unexpected strict mode reserved word
  32. at Module._compile (module.js:369:25)
  33. at Object..js (module.js:380:10)
  34. at Module.load (module.js:306:31)
  35. at Function._load (module.js:272:10)
  36. at require (module.js:318:19)
  37. at Object.<anonymous> (/Users/avishai/Downloads/anismiles-jsdom-based-screen-scraper-f0c79d3/searcher.js:2:15)
  38. at Module._compile (module.js:374:26)
  39. at Object..js (module.js:380:10)
  40. at Module.load (module.js:306:31)
  41. at Function._load (module.js:272:10)
  42.  
  43. var rediff = require('./searcher-rediff').searcher;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement