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

ramda-adjunct tried to access ramda #9929

Closed
simPod opened this issue May 13, 2024 · 5 comments
Closed

ramda-adjunct tried to access ramda #9929

simPod opened this issue May 13, 2024 · 5 comments
Assignees
Labels
dependencies Pull requests that update a dependency file type: integration bug

Comments

@simPod
Copy link
Contributor

simPod commented May 13, 2024

Q&A (please complete the following information)

  • OS: any
  • Browser: any
  • Version: [e.g. 22]
  • Method of installation: [e.g. npm, dist assets]
  • Swagger-UI version: [e.g. 3.10.0]
  • Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0]

Describe the bug you're encountering

When bumping swagger-ui-react 5.17.7 -> 5.17.8 it gives following error:

Module not found: Error: ramda-adjunct tried to access ramda (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.

To reproduce...

Use yarn pnp and compile

Expected behavior

No error

Screenshots

Additional context or thoughts

Related #7722

@char0n
Copy link
Member

char0n commented May 13, 2024

Hi @simPod,

Could you try to regenerate your package-lock.json or yarn.lock and reinstall your project?

@simPod
Copy link
Contributor Author

simPod commented May 13, 2024

Hi, it was regenerated by yarn install already. rm yarn.lock + yarn install does not help. The error is not caused by my lockfile but by incorrectly specifying dependencies.

Module not found: Error: ramda-adjunct tried to access ramda (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.

Required package: ramda
Required by: ramda-adjunct@virtual:df5141313e9ad6830e9e598bfb1a3514147bd28cb6d2bfdfc3c051daddff68c24f383fce7366a9570b61475de7fc5b335c9998a32b30475b74669a202d386532#npm:5.0.0 (via /Users/.../.yarn/__virtual__/ramda-adjunct-virtual-831a665b22/5/.yarn/berry/cache/ramda-adjunct-npm-5.0.0-0bc23d97d5-10c0.zip/node_modules/ramda-adjunct/es/)

Ancestor breaking the chain: swagger-client@npm:3.27.8

@char0n
Copy link
Member

char0n commented May 13, 2024

Partially addressed upstream in https://github.com/swagger-api/swagger-js/releases/tag/v3.27.9

We still need to release new version of SwaggerUI utilizing latest version of swagger-client@3.27.9. This should resolve the issue and will force package manager to reconciliate properly.

Reason why this happend

Dependency tree of downstream projects might contain ApiDOM@0.91.0 which still uses ramda-adjunct@4. Latest swagger-client uses directly ramda-adjunct@5, and it's expected when it reinstall that it fetches the latest ApiDOM version and consolidate the dependenices. But npm might choose not to re-consolidate and we'll get into this situation. Bundler will pull two versions of ramda-adjunct (4 and 5) and it will fail on compiling the 4, because it no longer contains isNotEmpty .
To fix this I explicitly must use latest version ApiDOM@0.92.0 (with ramda-adjunct@5 and ramda@0.30.0) and issue a new swagger-client + SwaggerUI release. This should re-consolidate the lock files properly downstream.

@char0n
Copy link
Member

char0n commented May 13, 2024

Address in SwaggerUI by #9930

@char0n
Copy link
Member

char0n commented May 13, 2024

Fix released as https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file type: integration bug
Projects
None yet
Development

No branches or pull requests

2 participants