question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'original' of undefined

See original GitHub issue

Hi, just updated:

-    "ember-cli-template-lint": "0.5.0",
+    "ember-cli-template-lint": "0.5.2",

And started seeing multiple errors like this in different templates, I created a minimal hbs to replicate the error:

Template

<div>
{{! some comment here }}
  {{tether-popover}}
</div>

Error

file changed components/my-component.hbs

undefined: Cannot read property 'original' of undefined (modules/forms/templates/components/my-component): 
`TypeError: Cannot read property 'original' of undefined
    at BasePlugin.BlockIndentation.validateBlockChildren (project/node_modules/ember-template-lint/lib/rules/lint-block-indentation.js:246:31)
    at BasePlugin.BlockIndentation.process (project/node_modules/ember-template-lint/lib/rules/lint-block-indentation.js:118:10)
    at BasePlugin.ElementNode (project/node_modules/ember-template-lint/lib/rules/lint-block-indentation.js:109:14)
    at project/node_modules/ember-template-lint/lib/rules/base.js:290:21
    at visitNode (project/node_modules/glimmer-engine/dist/node_modules/glimmer-syntax/lib/traversal/traverse.js:8:32)
    at visitArray (project/node_modules/glimmer-engine/dist/node_modules/glimmer-syntax/lib/traversal/traverse.js:63:22)
    at visitKey (project/node_modules/glimmer-engine/dist/node_modules/glimmer-syntax/lib/traversal/traverse.js:46:9)
    at visitNode (project/node_modules/glimmer-engine/dist/node_modules/glimmer-syntax/lib/traversal/traverse.js:24:13)
    at Object.traverse (project/node_modules/glimmer-engine/dist/node_modules/glimmer-syntax/lib/traversal/traverse.js:105:5)
    at BasePlugin.transform (project/node_modules/ember-template-lint/lib/rules/base.js:76:17)
    at Object.preprocess (project/node_modules/glimmer-engine/dist/node_modules/glimmer-syntax/lib/parser.js:24:31)
    at precompile (project/node_modules/glimmer-engine/dist/node_modules/glimmer-compiler/lib/compiler.js:37:32)
    at Linter.verify (project/node_modules/ember-template-lint/lib/index.js:94:7)
    at TemplateLinter.processString (project/node_modules/ember-cli-template-lint/broccoli-template-linter.js:91:28)
    at Promise.then.result.output (project/node_modules/broccoli-persistent-filter/lib/strategies/persistent.js:41:23)
    at initializePromise (project/node_modules/rsvp/dist/rsvp.js:588:5)
    at new Promise (project/node_modules/rsvp/dist/rsvp.js:1076:31)
    at project/node_modules/broccoli-persistent-filter/lib/strategies/persistent.js:40:18
    at tryCatch (project/node_modules/rsvp/dist/rsvp.js:538:12)
    at invokeCallback (project/node_modules/rsvp/dist/rsvp.js:553:13)
    at publish (project/node_modules/rsvp/dist/rsvp.js:521:7)
    at flush (project/node_modules/rsvp/dist/rsvp.js:2373:5)`
===== 1 Template Linting Error


Build successful - 4263ms.

This template does not print the error:

<div>
  {{! some comment here }}
  {{tether-popover}}
</div>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Jan 27, 2017

Oh no! I got confused and didn’t notice the package name, sorry about that! I’ll look into this ASAP.

0reactions
rwjbluecommented, Feb 27, 2017

Thanks @kellyselden!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'original' of undefined - Stack Overflow
With regards to your error Cannot read property 'original' of undefined , I imagine it's likely because you never initialized your state.
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >
How to Prevent the Error: Cannot Read Property '0' of Undefined
A guide on how to prevent the error "cannot Read Property '0' of Undefined", covering techniques such as try, catch, using const over...
Read more >
TypeError: Cannot read property 'origin' of undefined #308
TypeError : Cannot read property 'origin' of undefined #308. Open. mikestaub opened this issue on Apr 2, 2019 · 10 comments.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found