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

V 0.1.10 "Cannot read property 'title' of undefined" #6

Closed
xscheiner opened this issue Nov 11, 2014 · 4 comments
Closed

V 0.1.10 "Cannot read property 'title' of undefined" #6

xscheiner opened this issue Nov 11, 2014 · 4 comments

Comments

@xscheiner
Copy link

It looks like v.0.1.10 came out over the weekend. When I got into work on Monday and did an npm install on a fresh vagrant image, I got the following error on startup of my application:

/srv/sites/editor.playto.io/node_modules/derby/node_modules/derby-parsing/lib/index.js:29
throw appendErrorMessage(err, message);
^
TypeError: Cannot read property 'title' of undefined

Within template "TitleElement":
<title><view name="{{$render.prefix}}Title"></view></title>
at viewForTagName (/srv/sites/editor.playto.io/node_modules/derby/node_modules/derby-parsing/lib/index.js:166:59)
at parseHtmlStart (/srv/sites/editor.playto.io/node_modules/derby/node_modules/derby-parsing/lib/index.js:73:35)
at onStartTag (/srv/sites/editor.playto.io/node_modules/derby/node_modules/html-util/lib/parse.js:26:3)
at Object.module.exports as parse
at createTemplate (/srv/sites/editor.playto.io/node_modules/derby/node_modules/derby-parsing/lib/index.js:41:12)
at Template.templates.View._parse (/srv/sites/editor.playto.io/node_modules/derby/node_modules/derby-parsing/lib/index.js:25:18)
at Template.View.parse (/srv/sites/editor.playto.io/node_modules/derby/node_modules/derby-templates/lib/templates.js:185:8)
at Views.serialize (/srv/sites/editor.playto.io/node_modules/derby/node_modules/derby-templates/lib/templates.js:355:42)
at App._viewsSource (/srv/sites/editor.playto.io/node_modules/derby/lib/App.server.js:159:38)
at App.bundle (/srv/sites/editor.playto.io/node_modules/derby/lib/App.server.js:88:26)

The problem goes away when I downgrade to v.0.1.9.

I just started working on this code a few days ago, so I am not totally familiar with it or with Derby for that matter. However, I cannot find anything in the code to match the pattern of the 'TitleElement' template that appears to be being parsed which is what led me to check the dependencies and ultimately to narrow it to derby-templates.

@xscheiner xscheiner changed the title V 0.1.10 "Cannot read property 'title' of undefined V 0.1.10 "Cannot read property 'title' of undefined" Nov 11, 2014
@minicuper
Copy link

Use is instead of name-attribute. Also for template one should use 'tag' instead of 'element'.

@xscheiner
Copy link
Author

Sorry, is that a comment about the issue or something for me to do?

@minicuper
Copy link

I think your error is because of last changes in derby-parsing repo. Nate changed template syntax. So, for example, instead of

<view name="" ></view>

we should write

<view is="" ></view>

@nateps
Copy link
Contributor

nateps commented Nov 11, 2014

@zag2art is correct that the API is changing here, but both are supported for now while I finish working out the kinks in the 0.6.0-alphas.

This issue was my bad. I broke semantic versioning for an internal api shared between derby-templates and derby-parsing, which i think is what broke for you. I republished with both supported. However, you should probably remove the derby folder in your node_modules and fresh install the latest version of derby (0.6.0-alpha27).

@nateps nateps closed this as completed Nov 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants