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

Impossible to use hermione with yarn pnp mode #810

Closed
epszaw opened this issue Nov 27, 2023 · 7 comments
Closed

Impossible to use hermione with yarn pnp mode #810

epszaw opened this issue Nov 27, 2023 · 7 comments

Comments

@epszaw
Copy link
Contributor

epszaw commented Nov 27, 2023

When I try to use hermione in project which uses yarn pnp I receive this error all the time:

[12:56:16 GMT+0] Error: plugins-loader tried to access hermione-allure-hermione, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: hermione-allure-hermione
Required by: plugins-loader@npm:1.2.0 (via /home/runner/.yarn/berry/cache/plugins-loader-npm-1.2.0-c325a29b65-10c0.zip/node_modules/plugins-loader/lib/)

It happens due hermione try to resolve the plugin dynamically and yarn treats hermione--prefixed path as dependency, which should be present in package.json file. Unfortunately, there isn't workaround to bypass the problem.

To reproduce the problem:

  1. Create an empty directory
  2. Initialize yarn in the directory yarn init -2
  3. Bootstrap hermione project in the directory
  4. Run yarn install
  5. Run your test script
@DudaGod
Copy link
Member

DudaGod commented Nov 28, 2023

Hello.

Can you provide minimal reproducible example?

@epszaw
Copy link
Contributor Author

epszaw commented Nov 28, 2023

Sure, will prepare the example today

@epszaw
Copy link
Contributor Author

epszaw commented Nov 28, 2023

@DudaGod
Copy link
Member

DudaGod commented Nov 28, 2023

Try to use:

yarn config set nodeLinker node-modules
yarn
yarn test

@epszaw
Copy link
Contributor Author

epszaw commented Nov 28, 2023

Changing node linker in context of yarn pnp doesn't look like a complete solution, user should be able to use any linker

@DudaGod
Copy link
Member

DudaGod commented Nov 29, 2023

I agree this is not a complete solution, so I did not close the issue and offered a temporary solution. We need to fix it.

@DudaGod
Copy link
Member

DudaGod commented May 15, 2024

Fixed in hermione@8.9.2 (and testplane@8.11.2)

@DudaGod DudaGod closed this as completed May 15, 2024
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

3 participants