This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 20th, 2013  |  syntax: None  |  size: 2.03 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. TypeError: Object #<SendStream> has no method 'on'
  2.     at Object.static [as handle] (/app/node_modules/express/node_modules/connect/lib/middleware/static.js:75:8)
  3.     at next (/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
  4.        
  5. Express
  6. 500 TypeError: Object #<SendStream> has no method 'on'
  7.  
  8.     at Object.static [as handle] (/app/node_modules/express/node_modules/connect/lib/middleware/static.js:75:8)
  9.     at next (/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
  10.     at /app/node_modules/stylus/lib/middleware.js:174:46
  11.     at /app/node_modules/stylus/lib/middleware.js:208:20
  12.        
  13. {
  14.     "name": "app-name",
  15.       "version": "0.0.1",
  16.       "private": true,
  17.       "scripts": {
  18.       "start": "node app"
  19.      },
  20.      "dependencies": {
  21.        "express": "3.0.0rc1",
  22.        "jade": "*",
  23.        "stylus": "*"
  24.      }
  25.    }
  26.        
  27. /**
  28.  * Module dependencies.
  29.  */
  30.  var express = require('express')
  31.   , routes = require('./routes')
  32.   , http = require('http')
  33.   , path = require('path');
  34.  
  35. var app = express();
  36.  
  37. app.configure(function(){
  38.   app.set('port', process.env.PORT || 3000);
  39.   app.set('views', __dirname + '/views');
  40.   app.set('view engine', 'jade');
  41.   app.use(express.favicon());
  42.   app.use(express.logger('dev'));
  43.   app.use(express.bodyParser());
  44.   app.use(express.methodOverride());
  45.   app.use(app.router);
  46.   app.use(require('stylus').middleware(__dirname + '/public'));
  47.   app.use(express.static(path.join(__dirname, 'public')));
  48. });
  49.  
  50. app.configure('development', function(){
  51.   app.use(express.errorHandler());
  52. });
  53.  
  54. app.get('/', routes.index);
  55. app.get('/about', routes.about);
  56.  
  57. http.createServer(app).listen(app.get('port'), function(){
  58.   console.log("Express server listening on port " + app.get('port'));
  59. });
  60.        
  61. web: node app.js
  62.        
  63. {
  64.   "name": "app-name",
  65.   "version": "0.0.1",
  66.   "private": true,
  67.   "scripts": {
  68.     "start": "node app"
  69.   },
  70.   "dependencies": {
  71.     "express": "3.0.0rc1",
  72.     "jade": "*",
  73.     "stylus": "*"
  74.   },
  75.   "engines": {
  76.     "node": "0.8.4",
  77.     "npm": "1.1.41"
  78.   }
  79. }
  80.        
  81. vmc push yourappname --runtime node08
clone this paste RAW Paste Data