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

Errors when using with rollup + svelte #733

Closed
blackshadev opened this issue Sep 6, 2021 · 5 comments · Fixed by #800
Closed

Errors when using with rollup + svelte #733

blackshadev opened this issue Sep 6, 2021 · 5 comments · Fixed by #800

Comments

@blackshadev
Copy link

Hi I use Rollup and svelte for my project and this liberary (as a dependancy of "@testing-library#jest-dom") causes roll-up to complain:

First a Circular dependency on module basis. It isn't circular when you look at the functions so a minor moving of the getLocalName or hasAnyConcreteRoles would do the trick

(!) Circular dependency
node_modules/dom-accessibility-api/dist/util.mjs -> node_modules/dom-accessibility-api/dist/getRole.mjs -> node_modules/dom-accessibility-api/dist/util.mjs

Second an error about the package.json, basically you would need to add the package.json to the export class in it's own file.

[rollup-plugin-svelte] The following packages did not export their `package.json` file so we could not check the "svelte" field. If you had difficulties importing svelte components from a package, then please contact the author and ask them to export the package.json file.

I have no clue if you find this at all helpful, but if nobody provides you this feedback, you will never know that Svelte + Rollup doesn't like your package ;)

@eps1lon
Copy link
Owner

eps1lon commented Sep 6, 2021

Could you provide a reproduction? I do integration testing with several build setups so by this point it might just be an issue with rollup.

@blackshadev
Copy link
Author

I do not have a minimal reproduction, but I do have this issue in my application:
https://github.com/blackshadev/littledivelog-app-svelte

You can run yarn --frozen-lockfile yarn dev on it should raise both issues.

@eps1lon
Copy link
Owner

eps1lon commented Sep 10, 2021

I do not have a minimal reproduction, but I do have this issue in my application:
blackshadev/littledivelog-app-svelte

In order to be able to work on this issue, I need a minimal reproduction. I would suggest stripping more and more parts of your repository until the problem no longer reproduces.

@blackshadev
Copy link
Author

Sorry man, I don't see that going to happen, I do not use your API directly. I use @testing-library/jest-dom which uses your API. asking me for a minimal reproduction would still invoke @testing-library/jest-dom.
Both the errors are roll-up compile erros. so a minimal repro for me is just add import @testing-library/jest-dom; to in index.ts and compile it with rollup + svelte

@eps1lon
Copy link
Owner

eps1lon commented Sep 13, 2021

If you're not interested in providing code that I can debug, we can close this issue.

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

Successfully merging a pull request may close this issue.

2 participants