Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Error with readable-stream #293

Closed
tobiastimm opened this issue Feb 14, 2018 · 2 comments
Closed

Error with readable-stream #293

tobiastimm opened this issue Feb 14, 2018 · 2 comments

Comments

@tobiastimm
Copy link

tobiastimm commented Feb 14, 2018

When I use readable-stream with the rollup-plugin-commonjs it throws:

TypeError: The super constructor to "inherits" must not be null or undefined
    at Object.inherits (util.js:969:11)
    at Object.<anonymous> (/home/ttimm/dev/workspaces/rollup-readable-stream/dist/index.js:1129:8)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

at runtime.

I've created a repo and tested it with babel & typescript.

https://github.com/TobiasTimm/rollup-typescript-readable-stream

@westonpace
Copy link

In case someone else stumbles into this issue. This isn't really a problem with rollup-plugin-commonjs and more just an issue between rollup not supporting all circular dependencies and readable-stream not removing the circular dependency because they are valid under the ES module spec. They both have issues tracking this:

rollup/rollup#1507
nodejs/readable-stream#348

There is workaround mentioned in the first issue by timdp which replaces readable-stream with stream and it works most of the time for me.

@shellscape
Copy link
Contributor

Hey folks (this is a canned reply, but we mean it!). Thanks to everyone who participated in this issue. We're getting ready to move this plugin to a new home at https://github.com/rollup/plugins, and we have to do some spring cleaning of the issues to make that happen. We're going to close this one, but it doesn't mean that it's not still valid. We've got some time yet before the move while we resolve pending Pull Requests, so if this issue is still relevant, please @ me and I'll make sure it gets transferred to the new repo. 🍺

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants