[bug] `tauri dev --no-dev-server` doesn't work
Closed this issue · 1 comments
petersohn commented
Describe the bug
I'm using tauri from pnpm
. I want to run the dev server for the FE manually, so I don't want it to be started. According to pnpm tauri dev --help
, the --no-dev-server
should do it, but it doesn't work. Even if I add that switch, Tauri tries to run the dev server. If it's already running, it will complain of a port conflict.
Reproduction
pnpm tauri dev --no-dev-server
The first line of the output is:
Running BeforeDevCommand (`pnpm start`)
This step should be skipped.
Expected behavior
The starting of the dev server should be skipped.
Full tauri info
output
[⚠] Environment
- OS: Gentoo Linux 2.15.0 x86_64 (X64)
✔ webkit2gtk-4.1: 2.44.1
✔ rsvg2: 2.57.3
✔ rustc: 1.80.1 (3f5fd8dd4 2024-08-06) (gentoo)
✔ cargo: 1.80.1 (376290515 2024-07-16)
⚠ rustup: not installed!
If you have rust installed some other way, we recommend uninstalling it
then use rustup instead. Visit https://rustup.rs/
⚠ Rust toolchain: couldn't be detected!
Maybe you don't have rustup installed? if so, Visit https://rustup.rs/
- node: 22.4.1
- pnpm: 9.11.0
- npm: 10.8.1
[-] Packages
- tauri 🦀: 2.0.1
- tauri-build 🦀: 2.0.1
- wry 🦀: 0.44.1
- tao 🦀: 0.30.3
- @tauri-apps/api : 2.0.0-rc.5 (outdated, latest: 2.0.2)
- @tauri-apps/cli : 2.0.0-rc.16 (outdated, latest: 2.0.2)
[-] Plugins
- tauri-plugin-log 🦀: 2.0.1
- @tauri-apps/plugin-log : not installed!
- tauri-plugin-fs 🦀: 2.0.1
- @tauri-apps/plugin-fs : not installed!
- tauri-plugin-dialog 🦀: 2.0.1
- @tauri-apps/plugin-dialog : 2.0.0-rc.1 (outdated, latest: 2.0.0)
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:4200/
- framework: Angular
- bundler: Webpack
Stack trace
No response
Additional context
No response
FabianLars commented
--no-dev-server is only relevant if devUrl is a file path (in which case tauri will spin up an internal server). What you want instead is to unset beforeDevCommand
.