wails: "sh: 1: vite: not found" error from wails dev with Svelte template

Description

With wails v2.0.0-beta.39.2, initialize a new project using the svelte template, then run wails dev, the project fails to run as it is unable to find vite:

ian@ubuntu-jammy-qemu:~/Projects/scratch$ wails init -t svelte -n wailsv2b39.2
Wails CLI v2.0.0-beta.39.2

Initialising Project 'wailsv2b39.2'
-----------------------------------

go: downloading github.com/wailsapp/wails/v2 v2.0.0-beta.39.2
Project Name:      wailsv2b39.2
Project Directory: /home/ian/Projects/scratch/wailsv2b39.2
Project Template:  svelte
Template Support:  https://wails.io

Initialised project 'wailsv2b39.2' in 2.966s.


If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

ian@ubuntu-jammy-qemu:~/Projects/scratch$ cd wailsv2b39.2/
ian@ubuntu-jammy-qemu:~/Projects/scratch/wailsv2b39.2$ wails dev
Wails CLI v2.0.0-beta.39.2

Executing: go mod tidy -compat=1.17
Executing: wails generate module

> frontend@0.0.0 dev
> vite

sh: 1: vite: not found


ERROR: failed to find Vite server URL

If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

ian@ubuntu-jammy-qemu:~/Projects/scratch/wailsv2b39.2$

To Reproduce

  1. Using wails v2.0.0-beta.39.2
  2. wails init -t svelte -n wailsv2b39.2
  3. cd wailsv2b39.2
  4. wails dev

Expected behaviour

A running stock template app.

Screenshots

No response

Attempted Fixes

No response

System Details

The following is from Ubuntu 22.04, using the latest master branch (which only has an additional fix for the plain template), but I also saw it on stock v2.0.0-beta.39.2, including on NixOS:

Wails CLI v2.0.0-beta.39.2

Scanning system - Please wait (this may take a long time)...Done.

System
------
OS:		Ubuntu
Version: 	22.04
ID:		ubuntu
Go Version:	go1.18.1
Platform:	linux
Architecture:	amd64

Wails
------
Version: 		v2.0.0-beta.39.2
Revision:		1f62b5773d7a87b8a3ce04c76b0aaaab32fda691
Modified:		false
Package Manager: 	apt

Dependency	Package Name		Status		Version
----------	------------		------		-------
*docker		docker.io		Available	20.10.12-0ubuntu4
gcc		build-essential		Installed	12.9ubuntu3
libgtk-3	libgtk-3-dev		Installed	3.24.33-1ubuntu2
libwebkit	libwebkit2gtk-4.0-dev	Installed	2.36.4-0ubuntu0.22.04.1
npm		npm			Installed	8.5.5
*nsis		nsis			Available	3.08-2
pkg-config	pkg-config		Installed	0.29.2-1ubuntu3

* - Optional Dependency

Diagnosis
---------
Your system is ready for Wails development!
Optional package(s) installation details: 
  - docker: sudo apt install docker.io
  - nsis: sudo apt install nsis

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments

Closing as verified fixed in v2.0.0-beta.42.

Yup, PR #1580 fixed things up for me once I merged master into it and resolved the conflicts.

Oh I see what’s happening. Yeah, the vite-plugin-svelte project mandated vite3 which broke stuff 😠 There’s a PR in progress for that #1580

Does this fix the initial issue?

I’ll fix it tonight and get .3 out

Just to confirm, I’ve run make clean-all on my existing project so that it gets node_modules etc removed, and sure enough, it now will not run with wails dev because there’s no step to install the frontend dependencies.