#why dont work then i use html/css/js

1 messages · Page 1 of 1 (latest)

hollow harbor
#
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.
#

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

hollow harbor
#

🗿

heavy sinew
#

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.

hollow harbor
#

ok ill try

#

thanks

heavy sinew
#

Did you use cargo create-tauri-app to generate the project?

hollow harbor
#

no

#

but before this project im try use cargo to create project and run

#

and is give me difrent error

heavy sinew
#

How did you create the project files?

hollow harbor
#

yarn create tauri-app

heavy sinew
#

Did you get an error with cargo create-tauri-app or were you trying to create the project manually?

hollow harbor
#

no im get error then run the project

#

cargo tauri dev

#

i dont have any problem then creat justi have then run

heavy sinew
#

Could you share that error message?

hollow harbor
#

now i cant im in mobile but ill send later

heavy sinew
# hollow harbor

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.

hollow harbor
#

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

heavy sinew
#

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?

hollow harbor
#

im dont use electron in this project but the old version I used

#

this website im want to be app exe

heavy sinew
#

If it would work in a regular browser from a webserver, there shouldn't be any problem migrating.

hollow harbor
#

yes is work in browser