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

Installing Biome failed due to peerOptional package error #48

Closed
jellydn opened this issue May 2, 2024 · 2 comments
Closed

Installing Biome failed due to peerOptional package error #48

jellydn opened this issue May 2, 2024 · 2 comments

Comments

@jellydn
Copy link

jellydn commented May 2, 2024

Reproduce steps:

npm ERR! code ERESOLVE
  npm ERR! ERESOLVE could not resolve
  npm ERR! 
  npm ERR! While resolving: [email protected]
  npm ERR! Found: [email protected]
  npm ERR! node_modules/pino
  npm ERR!   pino@"9.0.0" from the root project
  npm ERR! 
  npm ERR! Could not resolve dependency:
  npm ERR! peerOptional pino@"^6.0.0 || ^7.0.0 || ^8.0.0" from [email protected]
  npm ERR! node_modules/moleculer
  npm ERR!   moleculer@"0.14.33" from the root project
  npm ERR!   moleculer@"^0.14.33" from [email protected]
  npm ERR!   node_modules/moleculer-connect
  npm ERR!     dev moleculer-connect@"0.2.2" from the root project
  npm ERR!   3 more (moleculer-io, moleculer-web, moleculer-zod-validator)
  npm ERR! 
  npm ERR! Conflicting peer dependency: [email protected]
  npm ERR! node_modules/pino
  npm ERR!   peerOptional pino@"^6.0.0 || ^7.0.0 || ^8.0.0" from [email protected]
  npm ERR!   node_modules/moleculer
  npm ERR!     moleculer@"0.14.33" from the root project
  npm ERR!     moleculer@"^0.14.33" from [email protected]
  npm ERR!     node_modules/moleculer-connect
  npm ERR!       dev moleculer-connect@"0.2.2" from the root project
  npm ERR!     3 more (moleculer-io, moleculer-web, moleculer-zod-validator)
  npm ERR! 
  npm ERR! Fix the upstream dependency conflict, or retry
  npm ERR! this command with --force or --legacy-peer-deps
  npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
  npm ERR! 
  npm ERR! 
  npm ERR! For a full report see:
  npm ERR! /home/runner/.npm/_logs/[202](https://github.com/jellydn/moleculer-typescript-template/actions/runs/8907929229/job/24462654550?pr=596#step:3:209)4-05-02T10_46_49_188Z-eresolve-report.txt
  
  npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2024-05-02T10_46_49_188Z-debug-0.log
  Error: Process completed with exit code 1.

Suggestion

Could we have a flag to pass to install biome or use a different package manager? Thank you for your work.

I also opened a PR on moleculerjs/moleculer#1282 but let's see if it would resolve the issue.

@mongolyy
Copy link
Owner

mongolyy commented May 3, 2024

@jellydn
Thanks for making the issue.

Could we have a flag to pass to install biome or use a different package manager?

You can install biome manually.
It checks if biome is installed and if it is, npm install is not executed.
https://github.com/mongolyy/reviewdog-action-biome/blob/main/lib/biome.sh#L4-L17

If you want to install it manually, you will have to install it using your favorite package manager in the step before calling the mongolyy/reviewdog-action-biome@v1 step.

I have not actually tried this, but I believe it works well if you pre-install as follows:

    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v3
        name: Install pnpm
        with:
          version: 9
          run_install: true
      - uses: mongolyy/reviewdog-action-biome@v1
        with:
          github_token: ${{ secrets.github_token }}
          reporter: github-pr-review

@jellydn
Copy link
Author

jellydn commented May 4, 2024

This works. Thanks, @mongolyy.

@jellydn jellydn closed this as completed May 4, 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