You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to tauri / npm. After cloning my tauri repo to a new machine, i did run into this
cargo tauri dev
Running BeforeDevCommand (npm run dev)
Info Watching [...]/src-tauri for changes...
npm error Missing script: "dev"
npm error
npm error To see a list of scripts, run:
npm error npm run
npm error A complete log of this run can be found in: [...]/.npm/_logs/2025-01-21T00_06_36_866Z-debug-0.log
Error The "beforeDevCommand" terminated with a non-zero status code.
the problem was that i had initialized npm in the src-tauri folder too. i.e. my folder structure was like this
ls *
frontend:
app.jsx components index.html main.jsx node_modules package.json package-lock.json public vite.config.js
src-tauri:
build.rs capabilities Cargo.lock Cargo.toml gen icons node_modules package.json package-lock.json public README.md src target tauri.conf.json
The cargo tauri build apparently finds any subfolder with a package.json. It did hit the src-tauri one, which has no scripts defined. Hence the error.
It would be beginner friendly to have some more explicit error e.g. "tauri found 2 package.json in subfolders and cannot choose which one. You should only have npm in frontend folder"
The text was updated successfully, but these errors were encountered:
Hello,
I am new to tauri / npm. After cloning my tauri repo to a new machine, i did run into this
the problem was that i had initialized npm in the src-tauri folder too. i.e. my folder structure was like this
The
cargo tauri build
apparently finds any subfolder with apackage.json
. It did hit the src-tauri one, which has no scripts defined. Hence the error.It would be beginner friendly to have some more explicit error e.g. "tauri found 2 package.json in subfolders and cannot choose which one. You should only have npm in frontend folder"
The text was updated successfully, but these errors were encountered: