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

Add engines property to package.json to warn while installing cli on node version <17 #9044

Open
1 task done
koiralakiran1 opened this issue May 5, 2024 · 2 comments · May be fixed by #12519
Open
1 task done

Add engines property to package.json to warn while installing cli on node version <17 #9044

koiralakiran1 opened this issue May 5, 2024 · 2 comments · May be fixed by #12519
Labels

Comments

@koiralakiran1
Copy link

koiralakiran1 commented May 5, 2024

Steps To Reproduce

  1. Create an environment with a node version 16 (for eg, as tested)
  2. Install cli (npm install -g @bitwarden/cli)
  3. The installation completes with warnings from dependencies that the current engine is unsupported
  4. Try bw --version. The command errors out.
    image

Expected Result

I'd expect the warning should come from @bitwarden/cli itself. This can be achieved using engines. It will warn by default but fail for --engines-strict=true

Actual Result

The warnings/error should come from bw cli itself rather than it's dependencies.

Screenshots or Videos

No response

Additional Context

No response

Operating System

Linux

Operating System Version

6.5.13-1-MANJARO

Shell

Bash

Build Version

2024.3.1

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@koiralakiran1 koiralakiran1 added bug cli CLI Application labels May 5, 2024
@sammbw
Copy link

sammbw commented May 6, 2024

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@koiralakiran1
Copy link
Author

Hi @sammbw,

Here is a video of this issue, reproduced in a node:16-alpine docker container, although it should be reproducible in any other node 16 environments. If you see, the warnings are coming from bw-cli's dependencies only, but my thought was that it should also come from bw-cli, which is the package being installed. So, my suggestion was to add engines property to package.json to warn about the unsupported engine from bw-cli itself. Also, the dependencies show supported engines as >=18, but I think bw-cli can run on node 17 as well. The >=18 on those dependencies could be because 18 is a LTS version but 17 isn't but I'm not completely sure.

bw-cli.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants