tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] Unable to add Tauri to Webpack/Capacitor project

Open trigun539 opened this issue 1 year ago • 0 comments

Describe the bug

Have a webpack project which is a git repo and has folders for ios and android from capacitor.

Run through the setup Tauri commands as mentioned here Integrate into Existing Project:

  • npm install --save-dev @tauri-apps/cli
  • npm run tauri init

After these, I tried to run npm run tauri dev but got the error below.

Reproduction

No response

Expected behavior

For the command npm run tauri dev to work as expected.

Full tauri info output

> tauri info


[✔] Environment
    - OS: Mac OS 14.2.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.76.0 (07dca489a 2024-02-04)
    ✔ cargo: 1.76.0 (c84b36747 2024-01-18)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.11.0
    - yarn: 1.22.21
    - npm: 10.2.4
    - bun: 1.0.25

[-] Packages
    - tauri [RUST]: 1.5.4
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.7
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 1.5.9

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../public
    - devPath: http://localhost:9000/
    - framework: React
    - bundler: Webpack

Stack trace

error: failed to determine package fingerprint for build script for app v0.1.0 (/Users/eperez/apps/word-wanderers/src-tauri)

Caused by:
  failed to determine the most recently modified file in /Users/eperez/apps/word-wanderers/src-tauri

Caused by:
  failed to determine list of files in /Users/eperez/apps/word-wanderers/src-tauri

Caused by:
  failed to open git index at /Users/eperez/apps/word-wanderers/.git/

Caused by:
  invalid data in index - calculated checksum does not match expected; class=Index (10)

Additional context

Simple static site built through webpack but using Capacitor for ios and android support. The site itself has no capacitor code at all. The built site is just html, assets folder for fonts, images, sounds (mp3), json.

If I remove the .git, android, ios folders. Then Tauri works fine and runs with the npm run tauri dev command.

I tried to add a .taurignore file in the src-tauri directory with those folders listed but still fails.

trigun539 avatar Feb 15 '24 21:02 trigun539