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.

Webpack or Rollup transpilation error - TypeError: Right-hand side of 'instanceof' is not an object

See original GitHub issue

It looks like the name of the function attached to ctor param is stripped by the transpilation process & given ctor instead.

The result is the error TypeError: Right-hand side of 'instanceof' is not an object

import { elements } from 'domino/lib/htmlelts'
console.debug(elements) // { ctor: [Function: ctor] }

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
nidi3commented, Nov 18, 2019

As the project seems to be sleeping at the moment, I published a build with this fix on npm https://www.npmjs.com/package/domino-ext. But I would like to see it applied here on the original.

0reactions
blakeoxxcommented, Aug 2, 2021

This still appears to be an issue in release 2.1.6. The domino-ext fork works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Right-hand side of 'instanceof' is not an object - Bountysource
Webpack or Rollup transpilation error - TypeError: Right-hand side of 'instanceof' is not an object.
Read more >
TypeError: invalid 'instanceof' operand 'x' - JavaScript | MDN
The instanceof operator expects the right-hand-side operands to be a constructor object, i.e. an object which has a prototype property and is ...
Read more >
How to fix "TypeError: Right-hand side of 'instanceof' is not ...
The problem is that you have a circular dependency. The other file requires index , index requires Transaction , and Transaction requires ...
Read more >
@babel/plugin-transform-instanceof | Yarn - Package Manager
This plugin transforms all the ES2015 'instanceof' methods. babel-plugin ... :eyeglasses: [Spec Compliance]; :rocket: [New Feature]; :bug: [Bug Fix] ...
Read more >
TypeScript Deep Dive
TypeScript's Type System ... Type errors do not prevent JavaScript emit ... Now the awesome part: The inner function can access the variables...
Read more >

github_iconTop Related Medium Post

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