express-debug icon indicating copy to clipboard operation
express-debug copied to clipboard

Add profile tab error

Open wegorich opened this issue 10 years ago • 1 comments

Trying to add profile tab to panel. Don't understand the error. Please help....

if ('development' === env || 'test' === env) {
    app.use(require('connect-livereload')());
    app.use(express.static(path.join(config.root, '.tmp')));
    app.use(qt.static(path.join(config.root, 'client')));
    app.set('appPath', 'client');
    app.use(morgan('dev'));

    require('express-debug')(app, {panels: ['locals', 'request', 'session', 'template', 'software_info', 'profile']});

    app.use(errorHandler()); // Error handler - has to be last
  }

error:

Waiting for server reload...
/node_modules/express-debug/lib/panels/profile/inject.js:55
    for (var i = 0; i < stack.length; i++) {
                             ^
TypeError: Cannot read property 'length' of undefined
    at Object.injections.middleware_profiler (/node_modules/express-debug/lib/panels/profile/inject.js:55:30)
    at Object.module.exports.initialize (/node_modules/express-debug/lib/panels/profile/index.js:15:16)
    at /node_modules/express-debug/lib/panels/index.js:42:35
    at Array.forEach (native)
    at Object.panels.load (/node_modules/express-debug/lib/panels/index.js:40:19)
    at module.exports (/node_modules/express-debug/lib/index.js:24:12)
    at module.exports (/server/config/express.js:58:29)
    at Object.<anonymous> (/server/app.js:24:28)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

wegorich avatar May 05 '15 13:05 wegorich

Oops sorry, I found that it doesn't work for express 4x :8ball:

wegorich avatar May 05 '15 13:05 wegorich