Skip to content

[bug] tauri info does not correctly identify @tauri-apps/api version #4106

@damien

Description

@damien

Describe the bug

When using Yarn Berry (3.2, PnP mode), the Tauri CLI does not correctly identify the installed version of @tauri-apps/api.

Reproduction

  1. yarn init -2
  2. yarn add -D @tauri-apps/cli
  3. yarn add @tauri-apps/api
  4. yarn install
  5. yarn tauri info

Expected behavior

yarn tauri info currently returns @tauri-apps/api [NPM]: Not installed! when listing packages.

yarn tauri info should return the correct version of the installed package (e.g. @tauri-apps/api [NPM]: 1.0.0-rc.5) when listing packages.

Platform and versions

vscode ➜ /workspaces/manager-desktop (master ✗) $ yarn tauri info

Environment
  › OS: Debian 10 X64
  › Node.js: 16.15.0
  › npm: 8.10.0
  › pnpm: Not installed!
  › yarn: 3.2.0
  › rustup: 1.24.3
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: 1.60.0-x86_64-unknown-linux-gnu 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.10
  › @tauri-apps/api [NPM]: Not installed!
  › tauri [RUST]: 1.0.0-rc.9 (no lockfile),
  › tauri-build [RUST]: no manifest (no lockfile),
  › tao [RUST]: no manifest (no lockfile),
  › wry [RUST]: no manifest (no lockfile),

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../src-ts
  › devPath: localhost:9009

App directory structure
  ├─ .devcontainer
  ├─ .git
  ├─ .vscode
  ├─ .yarn
  └─ src-tauri

Stack trace

No response

Additional context

Likely not required, but for exact reproduction you can use the following VSCode devcontainer.

Dockerfile

# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/rust/.devcontainer/base.Dockerfile

# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye
ARG VARIANT="buster"
FROM mcr.microsoft.com/vscode/devcontainers/rust:0-${VARIANT}

# Tauri system dependencies
# See: https://tauri.studio/v1/guides/getting-started/setup/linux
ARG TAURI_SYSTEM_DEPENDENCIES="libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev"

# [Optional] Uncomment this section to install additional packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install --no-install-recommends $TAURI_SYSTEM_DEPENDENCIES

devcontainer.json

// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/rust
{
	"name": "Rust",
	"build": {
		"dockerfile": "Dockerfile",
		"args": {
			// Use the VARIANT arg to pick a Debian OS version: buster, bullseye
			// Use bullseye when on local on arm64/Apple Silicon.
			"VARIANT": "buster"
		}
	},
	"runArgs": [
		"--cap-add=SYS_PTRACE",
		"--security-opt",
		"seccomp=unconfined"
	],

	// Set *default* container specific settings.json values on container create.
	"settings": {
		"lldb.executable": "/usr/bin/lldb",
		// VS Code don't watch files under ./target
		"files.watcherExclude": {
			"**/target/**": true
		},
		"rust-analyzer.checkOnSave.command": "clippy"
	},

	// Add the IDs of extensions you want installed when the container is created.
	"extensions": [
		"vadimcn.vscode-lldb",
		"mutantdino.resourcemonitor",
		"matklad.rust-analyzer",
		"tamasfe.even-better-toml",
		"serayuzgur.crates"
	],

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],

	// Use 'postCreateCommand' to run commands after the container is created.
	// "postCreateCommand": "rustc --version",

	// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "vscode",
	"features": {
		"node": "lts"
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions