Skip to content

'lazyrouter' undefined #3855

@ThatTonybo

Description

@ThatTonybo

I started a fresh project today, installing all my usual modules (express, body-parser and such). After setting everything up, as usual, I ran into this new error on node server.js`:

C:\Users\ThatTonybo\Desktop\discussion\node_modules\express\lib\application.js:214
  this.lazyrouter();
       ^

TypeError: Cannot read property 'lazyrouter' of undefined
    at use (C:\Users\ThatTonybo\Desktop\discussion\node_modules\express\lib\application.js:214:8)
    at module.exports (C:\Users\ThatTonybo\Desktop\discussion\router.js:3:5)
    at Object.<anonymous> (C:\Users\ThatTonybo\Desktop\discussion\server.js:25:20)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:279:19)

I've done a little investigating and searching, and it seems to occur at ln 214. this.lazyrouter(); in express/lib/application.js.

Is there a quick fix to this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions