osprey icon indicating copy to clipboard operation
osprey copied to clipboard

Cannot read property 'headers' of undefined when running example

Open postatum opened this issue 6 years ago • 0 comments

$ pwd
/projects/osprey

$ npm install .

$ cd examples/custom-auth

$ node index.js 
(node:8494) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'headers' of undefined
    at /projects/osprey/lib/server.js:77:75
    at Array.reduce (<anonymous>)
    at /projects/osprey/lib/server.js:70:38
    at Array.map (<anonymous>)
    at /projects/osprey/lib/server.js:66:43
    at Array.map (<anonymous>)
    at addSecurityHeaders (/projects/osprey/lib/server.js:64:35)
    at createServer (/projects/osprey/lib/server.js:27:10)
    at /projects/osprey/osprey.js:43:21
(node:8494) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8494) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

postatum avatar Dec 04 '18 12:12 postatum