Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Cannot read property 'headers' of undefined when running example #174

Open
postatum opened this issue Dec 4, 2018 · 0 comments
Open

Cannot read property 'headers' of undefined when running example #174

postatum opened this issue Dec 4, 2018 · 0 comments

Comments

@postatum
Copy link
Contributor

postatum commented Dec 4, 2018

$ 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 postatum mentioned this issue Dec 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant