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.

Undefined `ref` property

See original GitHub issue

node-inspector version: 0.12.8 node version: 6.9.1 OS: Windows 10 x64

See code at https://github.com/node-inspector/node-inspector/blob/master/lib/InjectorClient.js#L108-L111

if (!NM.length)
   error = new Error('No NativeModule in target scope');

cb(error, NM[0].ref);

if NM.length is zero, NM[0] is undefined and node-inspector crashes with TypeError: Cannot read property 'ref' of undefined.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:23
  • Comments:16

github_iconTop GitHub Comments

4reactions
SunilWangcommented, Jan 12, 2017

I also get this error:

  • node-inspector version: 0.12.8
  • node version: 6.9.3
  • OS: mac os x 10.12.2

See code at https://github.com/node-inspector/node-inspector/blob/master/lib/InjectorClient.js#L108-L111

if (!NM.length)
   error = new Error('No NativeModule in target scope');

cb(error, NM[0].ref);

temporary change :

if (!NM.length){
    error = new Error('No NativeModule in target scope');
    return cb(error);
}

cb(error, NM[0].ref);
1reaction
looptradercommented, Jan 29, 2017

same problem here on windows 10

Read more comments on GitHub >

github_iconTop Results From Across the Web

this.refs.something returns "undefined" - Stack Overflow
I want to access the DOM element properties like offset... or something. However, I keep getting undefined and I haven't the faintest idea...
Read more >
ReferenceError: reference to undefined property "x" - JavaScript
The JavaScript warning "reference to undefined property" occurs when a script attempted to access an object property which doesn't exist.
Read more >
Ref returns undefined or null in React [Solved] | bobbyhadz
A React ref most commonly returns undefined or null when we try to access its current property before its corresponding DOM element is...
Read more >
JavaScript ReferenceError - Reference to undefined property "x"
This JavaScript warning reference to undefined property occurs if a script tries to access an object property that doesn't exist. Message:.
Read more >
Unable to get property track of undefined or null reference?
New Error: Unable to get property track of undefined or null reference? I have several users who are getting this error upon log...
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