TypeError: Cannot read property 'rules' of undefined
See original GitHub issueI get this error while reading the value of the message
property of a MatchFailure
.
Using a debugger, my understanding is that this is caused by pexprs.Apply.prototype.toFailure
being called without a grammar
argument.
Indeed in my case toFailure
seems called without grammar
being passed to it:
pexprs.Alt.prototype.toFailure = function(grammar) {
var fs = this.terms.map(function(t) { return t.toFailure(); });
If I do not try to read the message
property, I get no crash… but no help in fixing my grammar either.
I am willing to provide my grammar and test case, should that be of any help.
Regards, Olivier.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Passing props to makeStyles gives error: TypeError: Cannot ...
TypeError : Cannot read property 'rules' of undefined RuleList.updateOne node_modules/jss/dist/jss.esm.js:956.
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 >TypeError: Cannot read properties of undefined (reading 'id')
I have this error in my terminal: TypeError: Cannot read properties of undefined (reading 'id').
Read more >useswr cannot read properties of undefined - You.com
To solve the "Cannot read properties of undefined" error, make sure to insert the JS script tag at the bottom of the body...
Read more >"Cannot read property 'getData' of undefined" in Rules
When openning Manage Rules in Recruiting and selecting a template, the following error appears: "Cannot read property 'getData' of undefined".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi! There was a problem with the latest version of npm — our repo structure caused
npm publish
to hang. It’s finally fixed now, and I just released version 15.0.0 of Ohm.I’m seeing the same issue:
I managed to get my program down to this example: