Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running via go run gives exec: "wails3": executable file not found in $PATH #4038

Closed
johnmaguire opened this issue Jan 28, 2025 · 2 comments
Closed
Labels
Bug Something isn't working

Comments

@johnmaguire
Copy link

Description

I was hoping to use the go.mod-installed version of Wails in order to keep all developers on the same version of the CLI tool. However, when running it via go run, Wails appears to try to use wails3 out of $PATH, rather than looking at the filepath of its own running executable. This has two problems:

  1. It will cause a failure if you attempt to run Wails this way and don't have Wails installed system-wide.
  2. If you do have Wails installed system-wide, the parent process will call a different child executable, potentially causing runtime errors or inconsistent behavior.

To Reproduce

❯ go run github.com/wailsapp/wails/v3/cmd/wails3 dev
2025/01/28 15:05:35 INFO Changing Working Directory dir=/Users/jmaguire/src/dnclient/cmd/ui/
2025/01/28 15:05:35 INFO Refresh Starting...
2025/01/28 15:05:35 ERROR Running Command exec="wails3 task common:install:frontend:deps" err="exec: \"wails3\": executable file not found in $PATH"
  ERROR   An error occured while starting proceses
exit status 1

Expected behaviour

Wails works the same as if installed system-wide.

Screenshots

No response

Attempted Fixes

No response

System Details

❯ go run github.com/wailsapp/wails/v3/cmd/wails3 doctor
 Wails (v3.0.0-alpha.9)  Wails Doctor

# System

┌──────────────────────────────────────────────────┐
| Name          | MacOS                            |
| Version       | 15.2                             |
| ID            | 24C101                           |
| Branding      | MacOS 15.2                       |
| Platform      | darwin                           |
| Architecture  | arm64                            |
| Apple Silicon | true                             |
| CPU           | Apple M1 Pro                     |
| CPU 1         | Apple M1 Pro                     |
| CPU 2         | Apple M1 Pro                     |
| GPU           | 16 cores, Metal Support: Metal 3 |
| Memory        | 32 GB                            |
└──────────────────────────────────────────────────┘

# Build Environment

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-alpha.9                                                                                                            |
| Go Version     | go1.23.5                                                                                                                  |
| -buildmode     | exe                                                                                                                       |
| -compiler      | gc                                                                                                                        |
| CGO_CFLAGS     |                                                                                                                           |
| CGO_CPPFLAGS   |                                                                                                                           |
| CGO_CXXFLAGS   |                                                                                                                           |
| CGO_ENABLED    | 1                                                                                                                         |
| CGO_LDFLAGS    |                                                                                                                           |
| DefaultGODEBUG | asynctimerchan=1,gotypesalias=0,httpservecontentkeepheaders=1,tls3des=1,tlskyber=0,x509keypairleaf=0,x509negativeserial=1 |
| GOARCH         | arm64                                                                                                                     |
| GOARM64        | v8.0                                                                                                                      |
| GOOS           | darwin                                                                                                                    |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies

┌────────────────────────────────────────────────────────────────────────┐
| *NSIS           | Not Installed. Install with `brew install makensis`. |
| Xcode cli tools | 2409                                                 |
| npm             | 10.9.2                                               |
└─────────────────────── * - Optional Dependency ────────────────────────┘

# Diagnosis

 SUCCESS  Your system is ready for Wails development!

Need documentation? Run: wails3 docs
 ♥   If Wails is useful to you or your company, please consider sponsoring the project: wails3 sponsor

Additional context

No response

@johnmaguire johnmaguire added the Bug Something isn't working label Jan 28, 2025
@leaanthony
Copy link
Member

Hi there! Thanks for this feedback.
Whilst v3 is in alpha, we have a strict feedback procedure outlined here: https://v3alpha.wails.io/getting-started/feedback
This is to reduce noise whilst the branch is unstable and keep all the information in one place. We'd love to have you as part of the v3 feedback loop so please consider opening a new post there. Just a copy and paste would be fine.
Closing this for now.
Thanks again 🙏

@johnmaguire
Copy link
Author

Hi there! Thanks for this feedback. Whilst v3 is in alpha, we have a strict feedback procedure outlined here: https://v3alpha.wails.io/getting-started/feedback This is to reduce noise whilst the branch is unstable and keep all the information in one place. We'd love to have you as part of the v3 feedback loop so please consider opening a new post there. Just a copy and paste would be fine. Closing this for now. Thanks again 🙏

@leaanthony The feedback link you provided results in a 404. I did miss the following note on the bug report form:

Image

Is the suggestion to repost this bug on Discord?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants