flow: FrontendUtils fails to find pnpm if only the newer version is installed
Description of the bug / feature
Minimal reproducible example
- Download Fusion app from start.vaadin.com for v20.
- Have only pnpm version 6 available in system’s path (in my case, 6.0.1).
- 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
- fixes #11730 — committed to vaadin/flow by martaolszewskatusiek 3 years ago
- fix: Use pinned supported pnpm version by default (#11859) Introduce `pnpm.global` to enable using globally installed pnpm. Default is false, and the pinned supported version of pnpm tool is used. ... — committed to vaadin/flow by mshabarov 3 years ago
- fix: Use pinned supported pnpm version by default Introduce `pnpm.global` config parameter to enable using globally installed pnpm. Default is false, and the pinned supported version of pnpm tool is ... — committed to vaadin/docs by mshabarov 3 years ago
- fix: Use proper npm/pnpm commands for Windows (#11905) Related-to #11730 — committed to vaadin/flow by mshabarov 3 years ago
- fix: Use pinned supported pnpm version by default (#775) * fix: Use pinned supported pnpm version by default Introduce `pnpm.global` config parameter to enable using globally installed pnpm. Defa... — committed to vaadin/docs by mshabarov 3 years ago
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\pnpmwith pnpm version 4.5.0. Nothing else was found in.vaadinorProgram Files.