yarn run v1.22.19
warning package.json: No license field
$ /home/aravan/node_modules/.bin/tauri dev
Running BeforeDevCommand (`npm run dev`)
Info Watching /home/aravan/src-tauri for changes...
Updating crates.io index
npm ERR! Missing script: "dev"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in: /home/aravan/.npm/_logs/2023-07-12T21_31_17_144Z-debug-0.log
Error The "beforeDevCommand" terminated with a non-zero status code.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#why dont work then i use html/css/js
1 messages · Page 1 of 1 (latest)
im new in tauri
is want me create packge json to run dev command but what im gona type in dev command im use just html/css/js i dont use react or any framework ?
this is my tauri config
🗿
You can correct this by changing the beforeDevCommand and beforeBuildCommand to yarn dev and yarn build.
When you run yarn create tauri-app, you need to select the correct package manager (seems to be Yarn in your case).
If you're not using NodeJS packages at all, you can use Tauri's CLI as a Cargo submodule which you can install using cargo install tauri-cli.
Did you use cargo create-tauri-app to generate the project?
no
but before this project im try use cargo to create project and run
and is give me difrent error
How did you create the project files?
yarn create tauri-app
Did you get an error with cargo create-tauri-app or were you trying to create the project manually?
no im get error then run the project
cargo tauri dev
i dont have any problem then creat justi have then run
Could you share that error message?
now i cant im in mobile but ill send later
No problem. The second image you posted above looks like it should work with cargo tauri dev as that's exactly the config that is generated when you select Vanilla JS.
ok thanks
I hope it works because I have three days trying to solve the problem
I used electron before, but I didn't like it because it's bad and slow
my project is ready im just want let it exe using rust
this is my project
You might have some problems with JS migration because Tauri's JS can be very different to Electron's.
I briefly read through it and didn't spot any use of Electron's API. Is this a regular website as an exe?
im dont use electron in this project but the old version I used
this website im want to be app exe
If it would work in a regular browser from a webserver, there shouldn't be any problem migrating.
yes is work in browser