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 'subscribe' of undefined

See original GitHub issue

Hi there, it seems that in this part is an error.

_createClass(Sticky, [{ key: 'componentWillMount', value: function componentWillMount() { this.channel = this.context['sticky-channel']; this.channel.subscribe(this.updateContext); } }, {

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cookpetecommented, Dec 21, 2016

Would it make sense to gracefully render without errors (perhaps a warning instead) if there is no parent StickyContainer? If I have a component that I want to be a Sticky when inside a StickyContainer but also use it elsewhere in my app, knowing whether to render it as a Sticky or not might prove difficult, just for the sake of avoiding this rather cryptic error.

0reactions
dbarbalatocommented, Apr 29, 2017

no longer relevant as of 6.x

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular "Cannot read property 'subscribe' of undefined"
The solution to this is that your getRecipes () method SHOULD NOT SUBSCRIBE. It should return either a Promise or an Observable.
Read more >
Cannot read property 'subscribe' of undefined - ng-mocks
This issue means that something has been replaced with a mock object and returns a dummy result ( undefined ) instead of observable...
Read more >
Spec file "Cannot read property of 'subscribe' of undefined"
Your problem is that your spySampleService.getMessage() returns undefined . Try spySampleService.getMessage.and.returnValue(of('message goes ...
Read more >
cannot read properties of undefined angular testing - You.com
Problem is that you have not mocked the data for userService , hence it overrides the value you are setting. You should mock...
Read more >
Cannot read property 'subscribe' of undefined when ... - GitHub
Hi,. I have a CI to upgrade dependencies and I'm having this error in my tests when trying to upgrade to react-redux to...
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