flow: FrontendUtils fails to find pnpm if only the newer version is installed

Description of the bug / feature

Minimal reproducible example

  1. Download Fusion app from start.vaadin.com for v20.
  2. Have only pnpm version 6 available in system’s path (in my case, 6.0.1).
  3. Run mvn spring-boot:run.

Expected behavior

mvn goal should run without issues, as pnpm 6 is more than the required minimum version of pnpm 5.

Actual behavior

Error: java.lang.IllegalStateException: Found too old 'pnpm'. If installed into the project 'node_modules', upgrade 'pnpm' to at least 5.0.0

Versions:

- Vaadin / Flow version: v20
- Java version: irrelevant
- OS version: irrelevant
- IDE (if applicable): Eclipse version: 2019-03 (4.11.0)

Possible fix

The command used to check for pnpm version, c:\_node_modules\npx.cmd --yes --quiet pnpm@5 --version should probably be c:\_node_modules\npx.cmd --yes --quiet pnpm@5+ --version. In the current form it produces an empty string when only a newer version is available.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 31 (28 by maintainers)

Commits related to this issue

Most upvoted comments

@martaolszewskatusiek thanks for details! And once you execute "c:\_node_modules\npx.cmd" --yes --quiet pnpm@5 --version in the prompt, the output is an empty string, right?

Yes, yes, it is an empty string.

However, if I run it without --quiet, it returns the proper version (edit: that’s in my case 6.14.13).

Found one under C:\Users\Tarek Oraby\AppData\Roaming\npm\node_modules\pnpm with pnpm version 4.5.0. Nothing else was found in .vaadin or Program Files.