Skip to content

[docs] Can't add nfc plugin as shown in readme #1131

Open
@gato25

Description

@gato25

Describe the bug

Tried to follow https://docs.rs/crate/tauri-plugin-nfc/latest

My lib.rs

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_nfc::init())
.invoke_handler(tauri::generate_handler![greet])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

But this gives an error

.plugin(tauri_plugin_nfc::init())
| ^^^^ not found in `tauri_plugin_nfc

How do i solve this ?

I tried to import use tauri_plugin_nfc::init; but still same issue.

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 123.0.2420.65
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.77.0 (aedd173a2 2024-03-17)
    ✔ cargo: 1.77.0 (3fe68eabf 2024-02-29)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.16.1
    - pnpm: 8.15.4
    - npm: 9.5.1

[-] Packages
    - tauri [RUST]: 2.0.0-beta.13
    - tauri-build [RUST]: 2.0.0-beta.10
    - wry [RUST]: 0.37.0
    - tao [RUST]: 0.26.1
    - @tauri-apps/api [NPM]: 2.0.0-beta.5
    - @tauri-apps/cli [NPM]: 2.0.0-beta.9

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Vue.js
    - bundler: Vite

Stack trace

No response

Additional context

No response

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