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

Incompatible module imports with Yarn Berry #5447

Open
1 of 4 tasks
snikch opened this issue May 21, 2023 · 1 comment
Open
1 of 4 tasks

Incompatible module imports with Yarn Berry #5447

snikch opened this issue May 21, 2023 · 1 comment

Comments

@snikch
Copy link

snikch commented May 21, 2023

Issue workflow progress

  • 1. The issue provides a reproduction available on CodeSandbox
  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

💥 🕸️  Mesh Error: Unable to load cache matching localforage while resolving @graphql-mesh/localforage: Error: @graphql-mesh/utils tried to access @graphql-mesh/localforage, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Mesh cli cannot be run in yarn 3 due to import errors.

To Reproduce Steps to reproduce the behavior:

Simply follow the installation instructions on the website and try run mesh dev with Yarn.

Additional context

Some of this appears to be an issue with the way the import name is generated, as it's importing @graphql-mesh/localforage not @graphql-mesh/cache-localforage. If I add a cache config with the key cache-localforage and add the package then the cache import works.

cache:
  cache-localforage:
    driver: [WEBSQL, INDEXEDDB, LOCALSTORAGE]

However, the underlying issue reappears with different imports that I'm not in control of:

💥 🕸️  Mesh Error: Unable to load merger matching bare while resolving @graphql-mesh/bare: Error: @graphql-mesh/utils tried to access @graphql-mesh/bare, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

This should be @graphql-mesh/merger-bare I believe.

@ardatan
Copy link
Owner

ardatan commented Jun 12, 2023

I don't know much about Yarn Berry and I have never used it. PRs are welcome to fix it!

This was referenced Apr 30, 2024
This was referenced May 7, 2024
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

2 participants