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.

CometD does not start when bundled with rollup and rollup-plugin-commonjs

See original GitHub issue

Ever since #858, I’m getting a Cannot read property 'cometdRuntime' of undefined when attempting to initialize CometD. I believe that it may be because I’m bundling CometD into my app using rollup and rollup-plugin-commonjs.

Shouldn’t this patch be using var runtime = root['cometdRuntime']; instead of var runtime = this['cometdRuntime']; or check if this exists ?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
sbordetcommented, Jul 11, 2019

I decided to rollback the fix for #858 (cometd/cometd-nodejs-client#17), so rollup should be fixed now.

0reactions
sbordetcommented, Jun 21, 2019

I’m out next week, but I will take a look and fix this issue (or rollback to previous code). Thanks for the repro projects!

Read more comments on GitHub >

github_iconTop Results From Across the Web

External dependencies are incorrectly bundled in rollup.js?
The answer I found was to include an additional argument to the rollup-plugin-node-resolve plugin call, as follows:
Read more >
2.55.0 regression - Unable to bundle semver@7 #4195 - GitHub
When updating to @rollup/plugin-commonjs@19 , this bug disappears. ... The generated bundled cjs code does not rely on treeshaking and works equally well ......
Read more >
rollup.js
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library...
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Learn how to use Rollup as a smaller, more efficient alternative to webpack and Browserify to bundle JavaScript files in this step-by-step tutorial...
Read more >
Bundling an npm version of TinyMCE with ES6 and Rollup.js
Procedure · Content CSS for styling editor content. There are community and premium style skins available, or use custom content CSS. · Plugins...
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