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.

onClick Watch, see in terminal TypeError: Cannot read property 'length' of undefined

See original GitHub issue

onClick Watch, I see in terminal TypeError: Cannot read property 'length' of undefined

Is this a bug report or a feature request?

bug report

Version Info

  • Version of Majestic: v1.2.23
  • Version of Jest: 23.6.0
  • Version of Node: v8.11.3
  • Operating System: macOs 10.14.4

Reproduction Repo

repro repo coming soon 🤞

$ npx majestic
npx: installed 29 in 1.974s
⚡  Majestic v1.2.23 is running at http://localhost:4000
/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:33749
    this.length = input.length;
                        ^

TypeError: Cannot read property 'length' of undefined
    at State.init (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:33749:25)
    at new Tokenizer (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:33806:16)
    at new UtilParser (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:34913:1)
    at new NodeUtils (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:35048:1)
    at new LValParser (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:35086:1)
    at new ExpressionParser (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:35410:1)
    at new StatementParser (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:37022:1)
    at new Parser (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:38494:5)
    at new <anonymous> (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:33023:26)
    at new <anonymous> (/Users/m/.npm/_npx/23768/lib/node_modules/majestic/dist/server/index.js:30585:5)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ziofatcommented, Apr 9, 2019

@Raathigesh Yes it does. The process exited with non-zero code and the buttons in web UI did not respond to any clicks.

1reaction
Raathigeshcommented, Apr 4, 2019

Unfortunately, this error alone doesn’t explain much. Would you be able to reproduce this in a minimal example, please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property Length of Undefined in JavaScript
The JavaScript TypeError: Cannot read property 'length' of undefined occurs when the length property is read on an undefined variable.
Read more >
Cannot read properties of undefined (reading 'length') - TrackJS
This message indicates that our code expects to have an object with a length property, but that object was not present.
Read more >
Uncaught TypeError: Cannot read property 'length' of undefined
The solution is check for null or undefined (to see whether the object exists) and only then iterate. Share.
Read more >
TypeError: Cannot read property 'length' of Undefined in JS
The "Cannot read property 'length' of undefined" error occurs when accessing the length property on an undefined value. To solve the error, make...
Read more >
Typeerror: Cannot Read Property 'length' of Undefined
A typeerror length of undefined can indicate that the actual type of an operand is different from the expected type. This error can...
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