question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[docs] Unprepared to answer tauri init questions

See original GitHub issue

While reading your setup docs, I feel unprepared for the questions tauri init asks.

I wanted to play around with Tauri so I went to set up a new app. Had smooth sailing until “Initialize Tauri in Your App” on https://tauri.studio/en/docs/development/integration

I’m told to run yarn tauri init. Sounds sensible.

It asks Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri" folder that will be created?

Huh? I don’t have any assets. Why won’t it accept a blank answer? Fine, let’s try asdf. Seems to be acceptable.

Then it asks What is the url of your dev server?

Again, huh? I don’t have a dev server. Tauri is supposed to create apps isn’t it? I suppose https://127.0.0.1 seems safe.

Then Do you want to install @tauri-apps/api?

No idea. What sort of an API are we talking about? This time I can just hit return. But what did I just do?

And it finishes.

It seems unlikely my guesses are correct. I’d appreciate it if the docs provided some guidance on how to answer these questions.

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:16
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

7reactions
ulvidocommented, Jul 24, 2021

I am new to tauri and “tauri init” process confusing for me too.

Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri" folder that will be created?: there aren’t any… I have nothing yet. just created a tauri project. what should I do?

What is the url of your dev server?: should it include port or not? or includes http at the start? http://127.0.0.1, http://127.0.0.1:5000, etc…

as a result unable to make it work yet. 😕 2021-07-24 22-44-33 ekran görüntüsü

WAIT: figured it out from this talk.

I created a folder at top level named “dist” and put an “index.html” in it.

and;

# src-tauri/tauri.conf.json

...
  "build": {
    "distDir": "../dist",
    "devPath": "../dist",
    "beforeDevCommand": "",
    "beforeBuildCommand": ""
  },
...

I think you should ask for “path” instead of “url”. and “dev server” for what? thank you.

3reactions
jonmadisoncommented, Jun 7, 2021

Tauri works with several frameworks. The thing that had been the most confusing to me is that the documentation to “create a tauri app” is essentially, create a new <whatever other framework app>, go into its directory, then run the steps. This didn’t become apparent to me until i stumbled upon a “tauri-react” package.

i.e.

npx create-react-app <myapp>

cd <myapp>

tauri init

then things make sense (except for the api question 😃

Autodetect would be nice, but it’s much more apparent what’s going on now that i know i can just create an empty app and “convert” it to a tauri app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[docs] Unprepared to answer tauri init questions #203 - GitHub
I'm told to run yarn tauri init . Sounds sensible. It asks Where are your web assets (HTML/CSS/JS) located, relative to the "<current...
Read more >
CLI | Tauri Apps
This command is pretty helpful when you need to have a quick overview of your application. When requesting some help, it can be...
Read more >
Hey Rustaceans! Got a question? Ask here! (28/2022)! : r/rust
Seek help here! There are no stupid questions, only docs that… ... Also check out last weeks' thread with many good questions and...
Read more >
Build rich text editors in React using Draft.js and react-draft ...
In this article, we will be using Draft.js and react-draft-wysiwyg to build a rich text editor and display text we created using the...
Read more >
How to center a tauri app on the osx tray icon - Stack Overflow
Please be sure to answer the question. Provide details and share your research! ... Asking for help, clarification, or responding to other answers...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found