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

Circular dependency warnings #98

Closed
fix-me opened this issue Oct 2, 2018 · 3 comments
Closed

Circular dependency warnings #98

fix-me opened this issue Oct 2, 2018 · 3 comments

Comments

@fix-me
Copy link

fix-me commented Oct 2, 2018

Hi,

I'm using swagger-parser module in a rollupJS library with the commonjs plugin.
Several circular dependencies appear while build process:

(!) Circular dependency: node_modules\z-schema\src\SchemaCache.js -> node_modules\z-schema\src\SchemaCompilation.js -> node_modules\z-schema\src\SchemaCache.js
(!) Circular dependency: node_modules\z-schema\src\SchemaCache.js -> node_modules\z-schema\src\SchemaCompilation.js ->  commonjs-proxy:***\node_modules\z-schema\src\SchemaCache.js -> node_modules\z-schema\src\SchemaCache.js
(!) Circular dependency: node_modules\json-schema-ref-parser\lib\ref.js -> node_modules\json-schema-ref-parser\lib\pointer.js -> node_modules\json-schema-ref-parser\lib\ref.js
(!) Circular dependency: node_modules\json-schema-ref-parser\lib\ref.js -> node_modules\json-schema-ref-parser\lib\pointer.js ->  commonjs-proxy:***\node_modules\json-schema-ref-parser\lib\ref.js -> node_modules\json-schema-ref-parser\lib\ref.js

Greetz!

@JamesMessinger
Copy link
Member

Circular dependencies between modules are allowed in JavaScript. If Rollup throws errors on circular dependencies, then that's a bug in Rollup.

That said... I bet there's a way to get Rollup to work. Maybe there's an option or a plugin or something. I'm not very familiar with Rollup, so I don't know.

@JamesMessinger
Copy link
Member

It appears that this is a known issue in Rollup

nodejs/readable-stream#348

@fix-me
Copy link
Author

fix-me commented Oct 4, 2018

Oh, I see its a problem with cjs modules which get lifted to es static imports.
So it's more related to the commonJS plugin, I'll try my best there.

Thank you!

@fix-me fix-me closed this as completed Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants