Questions tagged [tauri]

Tauri is a toolkit that helps developers make applications for the major platforms -- using HTML, CSS, and JavaScript. The core is built with Rust and leverages the local Webview2 / WebKit instance.

Resources:

262 questions
6
votes
2 answers

Tauri - How can I read a file inside the project folder?

I use the Tauri JS on Ubuntu. I would like to read a csv file which is in the project directory. /data/example.csv /src-tauri/ /src ... I activated the fs module, I tried different patterns "all": true, "fs": { "scope": { …
Dabagab
  • 2,497
  • 4
  • 26
  • 31
5
votes
3 answers

When I install and run Tauri on Mac OS Monterey I get immediate error

I installed it via: npm create tauri-app I chose a vanilla JavaScript environment to code it. I run: cd app npm install npm run tauri dev The result is this error: > app@0.0.0 tauri > tauri dev thread '' panicked at 'called…
William
  • 4,422
  • 17
  • 55
  • 108
5
votes
2 answers

How to fix an issue when window in undefined in tauri?

I am new at tauri and I have faced the issue with getting data from @tauri-apps/api. "@tauri-apps/api": "^1.1.0", "@tauri-apps/cli": "^1.1.1" This is my React code below: /index.jsx import {getTauriVersion} from "@tauri-apps/api/app" function…
5
votes
2 answers

Tauri : How to open webpage when cliking on the menu

I'm trying to make a small tauri app with the same menu on the top of each page. I followed this tutorial, "Adding the menu to all windows" section. I can see the menu, I can quit the app with it, but I can't find out how to go to another hmtl page…
4
votes
2 answers

Is there a way to compile and bundle another html file in tauri?

I am using tauri (1.2.5) with reactjs and I'm creating a splashscreen for my app. I've done this by creating a splashscreen.html file in the root directory (same dir as index.html) with this content: …
TEFOwen
  • 81
  • 5
4
votes
0 answers

How to center a tauri app on the osx tray icon

I am trying to center a Tauri app on the osx tray icon, but cannot find a way to do it. The idea is to make the app open and close on tray icon click, and to make it fixed at the top of the screen and centered on the icon (the y position may change…
Boguz
  • 1,600
  • 1
  • 12
  • 25
4
votes
0 answers

Tauri does not get .env.production when running tauri build

I've got a react app and implemented tauri to it so I can make it a desktop application. I have two .env files: .env.development and .env.production. When i run tauri dev everything works correctly, but when I run tauri build is running without the…
4
votes
1 answer

Tauri app shows white screen when I run the app

When running a Tauri app it just shows a white screen like this: I did not make any changes to the app Here is how I created the app: npx create-tauri-app Then I chose React as my frontend framework Then it created the app and I just cd'd into the…
4
votes
0 answers

"Big integer literals are not available" when integrating Discord.JS in Tauri

I'm trying to write a tauri app (react+ts+vite) that uses discord.js. However, when I try to run the application I get the following error: node_modules/discord-api-types/payloads/v9/permissions.js:17:16: ERROR: Big integer literals are not…
none
  • 45
  • 2
4
votes
1 answer

Change taskbar menu in Tauri

I'm using Tauri and would like to change the menu items shown when clicking my application in the taskbar using the right mouse button (Windows/Linux) or double click (MacOS). For example Firefox shows "Open a New Window" and music players often…
Mark
  • 18,730
  • 7
  • 107
  • 130
3
votes
0 answers

Drop files on Tauri icon in Dock

Is there any way to create a Tauri application for macOS that will accept files and folders dropped onto the Tauri icon in the Dock? In Electron, I think it is possible by defining CFBundleTypeExtensions in the electron-builder configuration file…
Johann
  • 41
  • 2
3
votes
3 answers

Window is undefined in NextJS + Tauri

What I'm trying to do: I was using the appWindow from Tauri to access the appWindow.minimize(), appWindow.toggleMaximize(), and appWindow.close() to create a custom title bar. What the code looks like: import { appWindow } from…
C.Tale
  • 263
  • 2
  • 13
3
votes
1 answer

Tauri: Is there some way to access AppHandler or Window in regular struct or state managed one?

I'm tring to use hotwatch to monitor folders for backups. If any changes happen, expect to emit an event to frontend to update pages. Then i found that it's not able to access AppHandle or Window in regular struct. I have tried using lifetime, but…
Hellagur
  • 93
  • 7
3
votes
1 answer

How to use window.location with Tauri?

I've got an onclick link in an svg that would link to another part of the website/program. I used window.location.replace(...) in the onclick window.location.replace(...)) /> and that works fine for the web browser - but it…
Vcoss
  • 95
  • 7
3
votes
1 answer

Tauri Not allowed to load local resource

I've been using electron for GUI interface development, recently I came across Tauri as electron alternative and coming to realize that the same code works on electron but not Tauri where:
1
2 3
17 18