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.

Initialization with jQuery -> Cannot read property 'jquery' of undefined

See original GitHub issue

When I add this to my initialization:

var airbrake = new airbrakeJs.Client({projectId: 1, projectKey: 'abc'});
if (window.jQuery) {
  airbrakeJs.instrumentation.jquery(airbrake, jQuery);
}

Cannot read property ‘jquery’ of undefined

airbrakeJs -> Object {}

What I doing wrong?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vmihailencocommented, Mar 13, 2017

Then just don’t include instrumentation/jquery.js file…

1reaction
vmihailencocommented, Aug 20, 2016

airbrake-js jQuery instrumentation just adds some hooks to standard jQuery version - https://raw.githubusercontent.com/airbrake/airbrake-js/master/src/instrumentation/jquery.coffee. It should work with 2.1.4, but I did not test it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'init' of undefined ...
Well, in your code you're calling a function called init from the object $.material but it seems that $.material is undefined. You have...
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 >
jquery-3.3.1.min.js:2 Uncaught TypeError
js:2 Uncaught TypeError: Cannot read property 'indexOf' of undefined. in Using jQuery • 4 years ago. I have upgraded jQuery version to 3.3.1...
Read more >
How to Fix TypeError: Cannot read Property 'push' of ...
You call the method on a variable previously set to undefined . · You call the method on a variable before it has...
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