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

See original GitHub issue

Hello, nanobus doesn’t work in browser. Why do you use Node API?

var assert = require('assert');

will break code for browsers.

The same for nanotiming. You assure that lib will work in browsers but it’s wrong (from nanotiming README: Works both in the browser and Node)

nanoscheduler has nanoassert as dependency and as I understand for browsers you replace node’s assert with your nanoassert using package.json browser field:

"browser": {
    "assert": "nanoassert"
},

Am I right?

Thanks

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
yoshuawuytscommented, Mar 18, 2018

@ok2ju hmmm, it sounds like this isn’t so much nanobus specific, as it’s a an issue with rollup. I think this issue in itself might be enough to help point people in the right way.

1reaction
goto-bus-stopcommented, Mar 15, 2018

hmm, I thought rollup-plugin-node-resolve would respect the browser field when setting the browser: true option, but it looks like it’s not working correctly.

You can get the same browser versions of core modules as browserify uses with the node-builtins plugin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'equal' of undefined
javascript - TypeError: Cannot read property 'equal' of undefined - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing ...
Read more >
TypeError: Cannot read property 'equal' of undefined #5 - GitHub
Hi,. That error occurs when I run these tests (occurs as well when I use shallow):. it("length is = 1", function() { expect(render(<Component...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
Undefined means that a variable has been declared but has not been assigned a value. In JavaScript, properties and functions can only belong...
Read more >
TypeError: Cannot read property 'equal' of undefined-Reactjs
Coding example for the question TypeError: Cannot read property 'equal' of undefined-Reactjs.
Read more >
typeerror: cannot read properties of undefined (reading 'equal')
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
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