#Build refused to connect

23 messages · Page 1 of 1 (latest)

lean pagoda
#

When I run my app through npm run tauri dev, everything works fine.

I built the app using npm run tauri build, and then ran the .exe file but it fails.

I get this screen. Did I do something wrong?

lapis yew
#

is it in the browser or in the actual app? any errors in the console when you run it?

lean pagoda
#

That's the .exe. I'll rebuild it with debug to check the console.

#

All I get in the console is an error that says:
VM109:2762

   crbug/1173575, non-JS module files deprecated.
lapis yew
#

hmm super weird, i don’t remember seeing it since our alphas

lean pagoda
#

Yeah, it works just fine when I run the dev build. But, the actual build version won't start.

undone jackal
#

also the general output of npm run tauri info would be nice here. maybe your distDir is misconfigured

lean pagoda
#
Environment
  › OS: Windows 10.0.19044 X64
  › Webview2: 100.0.1185.39
  › MSVC: 
      - Visual Studio Build Tools 2019
      - Visual Studio Build Tools 2022
  › Node.js: 16.16.0
  › npm: 8.13.2
  › pnpm: 6.11.0
  › yarn: 1.22.15
  › rustup: 1.24.3
  › rustc: 1.61.0
  › cargo: 1.61.0
  › Rust toolchain: stable-x86_64-pc-windows-msvc 

Packages
  › @tauri-apps/cli [NPM]: 1.2.3
  › @tauri-apps/api [NPM]: 1.2.0
  › tauri [RUST]: 1.2.4,
  › tauri-build [RUST]: 1.2.1,
  › tao [RUST]: 0.15.8,
  › wry [RUST]: 0.23.4,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../src
  › devPath: http://localhost:1420/
  › framework: React
  › bundler: Vite

App directory structure
  ├─ .vscode
  ├─ dist
  ├─ node_modules
  ├─ public
  ├─ src
  └─ src-tauri
undone jackal
#

yeah ../src for distDir does not look correct, vite's default output should be in ../dist

lean pagoda
#

I'm not sure how I should fix that. I don't believe I've done anything unusual when building the app? I just did npm create tauri-app, and have been building dev builds until yesterday.

undone jackal
#

this is not the default output of create-tauri-app. You must have changed the distDir in tauri.conf.json yourself

#

but again, just switch it back to "../dist" and you should be good to go again

lean pagoda
#

Weird. I don't know how or why I would have changed that, but that did the trick. Seems to be building just fine now. Thanks @undone jackal

carmine dragon
#

This is really strange, I'm having the exact same issue.
I too had to manually put "../dist" for distDir, also used create-tauri-app with vite. "../dist" didn't fix this issue for me though 😦
run tauri dev works fine, just can't build

Environment
› OS: Windows 10.0.22623 X64
› Webview2: 110.0.1587.50
› MSVC:
- Visual Studio Community 2022
- Visual Studio Community 2019
- Visual Studio Build Tools 2019
› Node.js: 18.4.0
› npm: 8.13.1
› pnpm: Not installed!
› yarn: 1.22.19
› rustup: 1.25.2
› rustc: 1.67.1
› cargo: 1.67.1
› Rust toolchain: stable-x86_64-pc-windows-msvc

Packages
› @tauri-apps/cli [NPM]: 1.2.3
› @tauri-apps/api [NPM]: 1.2.0
› tauri [RUST]: 1.2.4,
› tauri-build [RUST]: 1.2.1,
› tao [RUST]: 0.15.8,
› wry [RUST]: 0.23.4,

App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
› framework: React
› bundler: Vite

App directory structure
├─ .vscode
├─ dist
├─ node_modules
├─ public
├─ src
└─ src-tauri

undone jackal
carmine dragon
#

There is. I just ran a --verbose build and it's now working?

#

--debug still doesn't work, but --verbose fixes the release build

undone jackal
#

i did see the start of the log you deleted. and apart from --dev not existing which you already figured out, npm needs an additional -- to forward the args to tauri, like npm run tauri build -- --debug

carmine dragon
#

thanks!!

#

was just about to update

#

Works perfectly now.

  • distDir: "../dist"
  • run terminal as admin
  • --verbose log
  • run the right bloody command
#

Thanks so much

undone jackal
#

the admin part doesn't sound right to me but ig that depends on the setup