Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When compiled, shows warnings: Circular dependency #39

Open
francoisromain opened this issue Feb 21, 2018 · 11 comments
Open

When compiled, shows warnings: Circular dependency #39

francoisromain opened this issue Feb 21, 2018 · 11 comments

Comments

@francoisromain
Copy link

Hello,

When compiled, Rollup shows some warnings:

(!) Circular dependency: node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/duplex.js -> node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/readable.js -> node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/duplex.js
(!) Circular dependency: node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/duplex.js -> node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/writable.js -> node_modules/rollup-plugin-node-builtins/src/es6/readable-stream/duplex.js

Is is a problem?

@calvinmetcalf
Copy link
Owner

shouldn't be one

@juanjoDiaz
Copy link

I'm seeing the same. It would be great to get rid of the warning.

@linusschwalbe
Copy link

I do believe the circular problem stems from how Nodes stream is constructed. Though it would be preferable to be able to supres this specific warning in the plugin.

@kopax
Copy link

kopax commented Apr 1, 2018

I have the same warning

@nicobrinkkemper
Copy link

Did any of you solve this yet? I've got the same issue.

@ydaniv
Copy link

ydaniv commented Apr 3, 2018

Changing order of plugins around causes this to appear/disappear.
Moving node-resolve and commonjs before node-globals and node-builtins in the order of plugins causes it to appear, and vice versa it disappears, but then moduleContext doesn't work properly.

@calvinmetcalf
Copy link
Owner

folks as far as I know this is only a warning and not an error so my official position is 'don't worry about it'

the actual reason for it is because duplex streams inherit from both readable and writable streams but for various reasons both readable and writable streams need access to Duplex to check if the instance they are operating on is descended from a duplex or not (for reasons that really seamed good at the time) but is done here in a way that works fine for es6 module rules so probably isn't something to worry about

@orar
Copy link

orar commented Oct 28, 2018

I get same with htmparser2. Its not just a warning. I get the following error afterwards when running

var DomHandler$1 = lib.DomHandler,
                               ^
TypeError: Cannot read property 'DomHandler' of undefined

@barry800414
Copy link

I have the same warning and got same errors as @orar while running :(

@fabien-h
Copy link

Same warning here.

When I switch the order to have 'node-resolve' first, I get this error :

`An error occurred while building your code: TypeError: Cannot read property 'warn' of undefined. And the code does not compile.

@fabien-h
Copy link

Probably linked to this :

rollup/rollup-plugin-commonjs#248

This is an internal issue with the custom stream implementation.

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

No branches or pull requests

10 participants