forestlake / express-api-doc

auto generated express documentation
8 stars 2 forks source link

Azure Application Insights error #2

Open ChicagoDave opened 7 years ago

ChicagoDave commented 7 years ago

When I run doc.js, I get cannot read property 'stack' of undefined related to application insights.

.\node_modules\winston-azure-application-insights\node_modules\applicationinsights\AutoCollection\Exceptions.js:27

cybercoder commented 7 years ago

Yes, me too Express version : 4.15.4

NikolasStelmah commented 7 years ago

same in "express": "^4.14.0"

smsbhatt commented 6 years ago

Cannot read property 'stack' of undefined

smsbhatt commented 6 years ago

make sure dock.generate is called after app.use(middleware);

    setTimeout(async()=>{
        dock = await new Docs(app);
        await dock.generate({
          path:     './public/template.html',
          examples: './public/examples.txt',
        });
    },20000)

Or you can use async-await so that your code executes in order