Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'get' of undefined #2120

Closed
hems opened this issue Nov 10, 2014 · 6 comments
Closed

TypeError: Cannot read property 'get' of undefined #2120

hems opened this issue Nov 10, 2014 · 6 comments
Assignees
Milestone

Comments

@hems
Copy link

@hems hems commented Nov 10, 2014

I noticed today my application stopped working after running "npm install" again.

Debug: hapi, internal, implementation, error
    TypeError: Cannot read property 'get' of undefined
  at Object.exports.clone (/Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/node_modules/hoek/lib/index.js:67:31)
  at Object.exports.merge (/Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/node_modules/hoek/lib/index.js:119:39)
  at [object Object].internals.Manager.render (/Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/node_modules/vision/lib/index.js:267:20)
  at Object.internals.marshall (/Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/node_modules/vision/lib/index.js:476:13)
  at [object Object].internals.Message._marshall (/Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/lib/response/message.js:365:22)
  at Object.internals.marshall (/Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/lib/response/index.js:106:14)
  at Object.exports.send (/Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/lib/response/index.js:72:15)
  at /Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/lib/request.js:350:18
  at /Users/hems/git/3nder/3nder-refaktor/node_modules/hapi/node_modules/hoek/lib/index.js:754:22
  at process._tickDomainCallback (node.js:459:13)

It's happening locally ( Darwin ), and in staging ( ubuntu )

It wasn't happening with my node_modules from a few days ago.

So i noticed changing from "hapi": "^7.1.0" to "hapi": "7.1.0" was the solution, so perhaps there is something wrong with something after 7.1.0

cheers

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented Nov 10, 2014

@hems
Copy link
Author

@hems hems commented Nov 10, 2014

as far as i know i'm not using context objects.

@hems
Copy link
Author

@hems hems commented Nov 10, 2014

my views declaration is pretty simple,

server.views({
  engines: {
    jade: require('jade')
  },
  compileOptions: {
    pretty: true
  },
  path: __dirname + '/views'
});

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented Nov 10, 2014

It's something with the context you are passing in to render it. This is a bug a vision.

@hueniverse hueniverse added this to the 7.5.1 milestone Nov 10, 2014
@hems
Copy link
Author

@hems hems commented Nov 11, 2014

i'll have a look, but it does work with my 7.1 did something change on the way the context is passed after it?

sorry if i'm missing something

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented Nov 11, 2014

7.5 added a new global context feature which can cause issues.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants