wails
wails copied to clipboard
Debugger exited because unable to infer index.html file in dev mode
Description
Here is the reproduce project, this wails vue project generate from wails init -n myproject -t vue -ide vscode
command, then i comment the above code in main.go
:
//go:embed all:frontend/dist
var assets embed.FS
and move them to frontend directory:
//go:embed all:dist
var Assets embed.FS
This change reuslt the tryInferAssetDirFromFS crash and debug console output these:
Starting: xxx\gopath-1.22.3-x64\bin\dlv.exe dap --listen=127.0.0.1:50841 from xxx\myproject
DAP server listening at: 127.0.0.1:50841
Type 'dlv help' for list of commands.
Error: unable to infer the AssetDir from your Assets fs.FS: inferred assetdir 'xxx\myproject\dist' does not exist or does not contain an 'index.html' file, please specify it with -assetdir or set it in wails.json
Process 14904 has exited with status 0
Detaching
To Reproduce
Here is the reproduce project, download then open it in vscode, switch debug to Wails: Dev myproject
and presss F5.
Expected behaviour
The path
in tryInferAssetDirFromFS
should be "frontend/dist/" instead "dist/".
Screenshots
No response
Attempted Fixes
No response
System Details
# Wails
Version | v2.8.2
# System
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS | Windows 10 Enterprise |
| Version | 2009 (Build: 22621) |
| ID | 22H2 |
| Go Version | go1.22.3 |
| Platform | windows |
| Architecture | amd64 |
| CPU | 12th Gen Intel(R) Core(TM) i5-12600KF |
| GPU 1 | OrayIddDriver Device (Shanghai Best Oray Information Technology Co., Ltd.) - Driver: 17.1.58.818 |
| GPU 2 | NVIDIA GeForce GTX 1660 Ti (NVIDIA) - Driver: 27.21.14.5671 |
| Memory | 48GB |
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
# Dependencies
┌───────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| WebView2 | N/A | Installed | 123.0.2420.65 |
| Nodejs | N/A | Installed | 20.12.2 |
| npm | N/A | Installed | 10.8.1 |
| *upx | N/A | Installed | upx 4.0.1 |
| *nsis | N/A | Available | |
└─────────────── * - Optional Dependency ───────────────┘
# Diagnosis
Optional package(s) installation details:
- nsis : More info at https://wails.io/docs/guides/windows-installer/
SUCCESS Your system is ready for Wails development!
♥ If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
Additional context
No response