1. Your usage scenarios? | 您使用的场景?
PS C:\Users\vector> go version
go version go1.16.8 windows/amd64
PS C:\Users\vector> go1.17 version
go version go1.17 windows/amd64
PS C:\Users\vector> wails doctor
Wails CLI v2.0.0-beta.34
Scanning system - Please wait (this may take a long time)...Done.
System
OS: Windows 10 Pro
Version: 2009 (Build: 22000)
ID: 21H2
Go Version: go1.16.8
Platform: windows
Architecture: amd64
Dependency Package Name Status Version
WebView2 N/A Installed 100.0.1185.39
npm N/A Installed 8.5.0
*upx N/A Available
*nsis N/A Available
Diagnosis
Your system is ready for Wails development!
Optional package(s) installation details:
If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
PS C:\Users\vector>
2. What did you do? | 您做了什么操作?
PS C:\Users\vector\mydata\code\go_wails\myFProject> go1.17 version
go version go1.17 windows/amd64
PS C:\Users\vector\mydata\code\go_wails\myFProject> go version
go version go1.16.8 windows/amd64
PS C:\Users\vector\mydata\code\go_wails\myFProject> go1.17 mod tidy
PS C:\Users\vector\mydata\code\go_wails\myFProject> go mod tidy
go mod tidy: go.mod file indicates go 1.17, but maximum supported version is 1.16
PS C:\Users\vector\mydata\code\go_wails\myFProject> wails dev
Wails CLI v2.0.0-beta.34
Executing: go mod tidy
go mod tidy: go.mod file indicates go 1.17, but maximum supported version is 1.16
exit status 1
ERROR: exit status 1
If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
PS C:\Users\vector\mydata\code\go_wails\myFProject> wails dev -compiler "go1.17"
Wails CLI v2.0.0-beta.34
Executing: go mod tidy
go mod tidy: go.mod file indicates go 1.17, but maximum supported version is 1.16
exit status 1
ERROR: exit status 1
If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
PS C:\Users\vector\mydata\code\go_wails\myFProject>
===>go.mod========
module wails-vue
go 1.17
require github.com/wailsapp/wails/v2 v2.0.0-beta.34
require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fasthttp/websocket v1.5.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/gofiber/fiber/v2 v2.31.0 // indirect
github.com/gofiber/websocket/v2 v2.0.20 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/leaanthony/go-ansi-parser v1.4.0 // indirect
github.com/leaanthony/go-common-file-dialog v1.0.3 // indirect
github.com/leaanthony/go-webview2 v1.0.3-0.20220314105146-f44268990abe // indirect
github.com/leaanthony/gosod v1.0.3 // indirect
github.com/leaanthony/slicer v1.6.0 // indirect
github.com/leaanthony/typescriptify-golang-structs v0.1.7 // indirect
github.com/leaanthony/winc v0.0.0-20220323084916-ea5df694ec1f // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/savsgio/gotils v0.0.0-20220401102855-e56b59f40436 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/tkrajina/go-reflector v0.5.6 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.35.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
)
require (
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
)
// replace github.com/wailsapp/wails/v2 v2.0.0-beta.34 => C:\Users\vector\go\pkg\mod\github.com\wailsapp\wails\[email protected]
切换环境变量后,可以成功
C:\Users\vector\mydata\code\go_wails\myFProject>go version
go version go1.17 windows/amd64
C:\Users\vector\mydata\code\go_wails\myFProject>wails doctor
Wails CLI v2.0.0-beta.34
Scanning system - Please wait (this may take a long time)...Done.
System
OS: Windows 10 Pro
Version: 2009 (Build: 22000)
ID: 21H2
Go Version: go1.16.8
Platform: windows
Architecture: amd64
Dependency Package Name Status Version
WebView2 N/A Installed 100.0.1185.39
npm N/A Installed 8.5.0
*upx N/A Available
*nsis N/A Available
Diagnosis
Your system is ready for Wails development!
Optional package(s) installation details:
If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
C:\Users\vector\mydata\code\go_wails\myFProject>wails dev
Wails CLI v2.0.0-beta.34
Executing: go mod tidy
Executing: wails generate module
Building application for development...
- Installing frontend dependencies: Done.
- Compiling frontend: Done.
- Generating bundle assets: Done.
- Compiling application: Done.
Running frontend dev watcher command: 'npm run build:watch -w js'
INF | Serving assets from disk: C:\Users\vector\mydata\code\go_wails\myFProject\frontend\dist
DEB | WebView2 Runtime Version '100.0.1185.39' installed. Minimum version required: 91.0.992.28.
DEB | [DevWebServer] Serving application at http://localhost:34115
Watching (sub)/directory: C:\Users\vector\mydata\code\go_wails\myFProject
Using Dev Server URL: http://localhost:34115
Using reload debounce setting of 1500 milliseconds
DEB | [DesktopAssetServer] Loading file: assets/index.js
DEB | [DesktopAssetServer] Loading file: assets/index.css
前端Dom加载完毕
[email protected] build:watch
vite build --watch --emptyOutDir
3. What are your problems? | 您遇到了什么问题?
- -compiler “go编译器版本”
是否需要本地版本必须是go1.17才能正常使用
- wails doctor
检查系统环境,在go版本切换到1.17后,检测出Go Version: go1.16.8;
4. What is your expected outcome? | 您期望的结果是怎样的?
- 在低版本时可以在本地安装高版本的go,通过
-compiler
指定后能成功运行
- 将本地go版本升级后 使用wails dctor 命令应检测到升级后的版本