tauri info panics with "unexpected end of input while parsing minor version number" on pnpm peer-suffixed paths
Describe the bug
tauri info aborts with a panic when the project is a pnpm workspace whose .pnpm store contains a peer-suffixed directory for a @tauri-apps/* package:
thread '<unnamed>' panicked at crates\tauri-cli\src\info\packages_nodejs.rs:180:66:
called `Result::unwrap()` on an `Err` value: Error("unexpected end of input while parsing minor version number")
The value being parsed is not the installed version — it is a substring of a filesystem path:
// crates/tauri-cli/src/info/packages_nodejs.rs:180
let version = semver::Version::parse(version.as_str()).unwrap();
let target_version = semver::Version::parse(latest_ver.as_str()).unwrap();
version comes from PackageManager::current_package_version, which for pnpm runs pnpm list <package> --parseable --depth 0 and then scrapes the version out of the printed path with a regex:
// crates/tauri-cli/src/helpers/npm.rs:270-278
let stdout = String::from_utf8_lossy(&output.stdout);
let regex = regex.unwrap_or_else(|| regex::Regex::new("@(\\d[\\da-zA-Z\\-\\.]+)").unwrap());
Ok(regex.captures_iter(&stdout).last().and_then(|cap| cap.get(1).map(|v| v.as_str().to_string())))
pnpm names peer-suffixed store directories <name>@<version>_<peerHash>, and _ is not in the character class, so the capture stops at the underscore and yields a truncated version.
Reproduction
pnpm 11.7.0 workspace where @tauri-apps/plugin-http also exists as a peer-suffixed instance (the package inside those directories is really 2.6.0):
$ ls node_modules/.pnpm | grep plugin-http
@[email protected]_0468b0582090adf2ebbecf810069c6d8
@[email protected]_3b0f9b4c3d427f45bc4a8b6002dd0cb2
@[email protected]
$ pnpm list @tauri-apps/plugin-http --parseable --depth 0
D:\project
D:\project\node_modules\.pnpm\@[email protected]_3b0f9b4c3d427f45bc4a8b6002dd0cb2\node_modules\@tauri-apps\plugin-http
$ pnpm tauri info
… prints Environment and Packages, then panics (output below)
Applying the CLI's own regex @(\d[\da-zA-Z\-\.]+) to that stdout captures 2.6 (the _ terminates the match). semver::Version::parse("2.6") produces exactly the panic message:
# semver 1.x, checked locally
2 -> unexpected end of input while parsing major version number
2.6 -> unexpected end of input while parsing minor version number <- matches the panic
2.6.0 -> OK
2.6_3b0f9b4c -> unexpected character '_' after minor version number
catalog:tauri -> unexpected character 'c' while parsing major version number
Other @tauri-apps/* packages in the same install (api 2.11.1, cli 2.11.4, plugin-os 2.3.2, plugin-store 2.4.4) resolve to non-peer-suffixed directories, parse fine, and print normally. plugin-http is the one that takes down the whole command.
I also confirmed this is not manifest-driven: a directory containing only package.json + pnpm-workspace.yaml + src-tauri/ (including catalog: specs in the pnpm catalog and tauri-plugin-http = "2.6" in Cargo.toml) does not panic; adding node_modules does.
Expected behavior
tauri info should print the report. The parsed values are only used to append an (outdated, latest: …) suffix, so an unparseable value should just degrade to no suffix:
if let (Ok(version), Ok(target_version)) =
(semver::Version::parse(version.as_str()), semver::Version::parse(latest_ver.as_str()))
{
…
}
More generally, scraping a version out of a path with a regex cannot handle pnpm's peer-suffixed directory names. There is already a JSON-based path — current_package_versions (pnpm list --json --depth 0) — with a TODO next to current_package_version saying it should be used as much as possible (helpers/npm.rs:209).
Full tauri info output
[✔] Environment
- OS: Windows 10.0.26200 x86_64 (X64)
✔ WebView2: 153.0.4234.32
✔ MSVC: Visual Studio Community 2022
✔ rustc: 1.91.1 (ed61e7d7e 2025-11-07)
✔ cargo: 1.91.1 (ea2d97820 2025-10-10)
✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 25.5.0
- pnpm: 11.7.0
- npm: 11.8.0
- bun: 1.4.0
[-] Packages
- tauri : 2.11.5
- tauri-build : 2.6.3
- wry : 0.55.1, (outdated, latest: 0.57.0)
- tao : 0.35.3, (outdated, latest: 0.37.0)
- @tauri-apps/api ⱼₛ: 2.11.1
- @tauri-apps/cli ⱼₛ: 2.11.4
thread '<unnamed>' (35868) panicked at crates\tauri-cli\src\info\packages_nodejs.rs:180:66:
called `Result::unwrap()` on an `Err` value: Error("unexpected end of input while parsing minor version number")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The [-] Plugins section never prints. The process exits with -1073740791 (0xC0000409), so any CI step that collects tauri info fails too.
Stack trace
thread '<unnamed>' (35868) panicked at crates\tauri-cli\src\info\packages_nodejs.rs:180:66:
called `Result::unwrap()` on an `Err` value: Error("unexpected end of input while parsing minor version number")
stack backtrace:
0: 0x7ffcc49fe53d - napi_register_module_v1
1: 0x7ffcc46797f1 - <unknown>
2: 0x7ffcc49fdd54 - napi_register_module_v1
3: 0x7ffcc49fdafd - napi_register_module_v1
4: 0x7ffcc4a03c75 - napi_register_module_v1
5: 0x7ffcc4a03c0f - napi_register_module_v1
6: 0x7ffcc4a050ae - napi_register_module_v1
7: 0x7ffcc4ecd9fd - napi_register_module_v1
8: 0x7ffcc4ecdd47 - napi_register_module_v1
The released binary is built without symbols, so RUST_BACKTRACE=full only adds addresses; the panic location above is the useful part.
Additional context
@tauri-apps/cli2.11.4 /tauri2.11.5, node 25.5.0, pnpm 11.7.0, Windows 10.0.26200 x86_64, WebView2 153.0.4234.32.- Verified against the released
tauri-cli-v2.11.4source:crates/tauri-cli/src/info/packages_nodejs.rs:180, callercrates/tauri-cli/src/info/plugins.rs(nodejs_section_item(package, None, …), i.e.version = None→ path scraping), andcrates/tauri-cli/src/helpers/npm.rs:242-278. - The pnpm catalog protocol is not required to hit this (
catalog:values reproduce nothing on their own); the trigger is the peer-suffixed store path. - Slightly ironic:
tauri infois a required field of this repository's own bug report template, which is how I ran into this while preparing another report.
Source: tauri-apps/tauri