wails icon indicating copy to clipboard operation
wails copied to clipboard

Incorrect installation & docs for macOS

Open iocron opened this issue 11 months ago • 5 comments

Description

/usr/local/go does not exist after installing golang (used brew install go) and wails is nowhere to be found near this location after installing it. But it does exist on /Users/USERNAME/go/bin/wails

To Reproduce

  1. brew install go
  2. go install github.com/wailsapp/wails/v2/cmd/wails@latest
  3. Add /usr/local/go to PATH
  4. Wails command does not exist wails version

Expected behaviour

wails command should be available/found at /usr/local/go, as mentioned in https://wails.io/docs/gettingstarted/installation but that seems to be incorrect. Instead its been found at /Users/USERNAME/go/bin/wails

Screenshots

No response

Attempted Fixes

export PATH="/Users/USERNAME/go/bin:$PATH"

System Details

NOTHING, because "wails" command is not being found at the location mentioned at /usr/local/go
But `/Users/USERNAME/go/bin/wails doctor` returns the following: 

# Wails
Version | v2.8.0

# System
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS           | MacOS                                                                                                                       |
| Version      | 14.1.1                                                                                                                      |
| ID           | 23B81                                                                                                                       |
| Go Version   | go1.22.0                                                                                                                    |
| Platform     | darwin                                                                                                                      |
| Architecture | arm64                                                                                                                       |
| CPU          | Apple M1 Pro                                                                                                                |
| GPU          | Chipset Model: Apple M1 Pro Type: GPU Bus: Built-In Total Number of Cores: 16 Vendor: Apple (0x106b) Metal Support: Metal 3 |
| Memory       | 16GB                                                                                                                        |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────────┐
| Dependency                | Package Name | Status    | Version |
| Xcode command line tools  | N/A          | Installed | 2403    |
| Nodejs                    | N/A          | Installed | 21.6.2  |
| npm                       | N/A          | Installed | 10.2.4  |
| *Xcode                    | N/A          | Available |         |
| *upx                      | N/A          | Available |         |
| *nsis                     | N/A          | Available |         |
└─────────────────── * - Optional Dependency ────────────────────┘

# Diagnosis
Optional package(s) installation details:
  - Xcode: Available at https://apps.apple.com/us/app/xcode/id497799835
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 SUCCESS  Your system is ready for Wails development!

Additional context

No response

iocron avatar Feb 29 '24 23:02 iocron

I think you missed this step: image

Also about /usr/local/go not being there, the tutorial is based on the recommended go installation, which if you do as in the documentation you will find the go executable there.

wizzymore avatar Mar 01 '24 00:03 wizzymore

Thanks for reporting this and using Wails

As already mentioned the docs are based on the official 'Go Installation instructions', and it's also stated that one needs to ensure that ~/go/bin is in PATH.

wails command should be available/found at /usr/local/go, as mentioned in https://wails.io/docs/gettingstarted/installation but that seems to be incorrect.

I could not find the section where this is mentioned. ~ means your home directory so ~/go/bin is basically for macOS /Users/USERNAME/go/bin/.

stffabi avatar Mar 01 '24 07:03 stffabi

I could not find the section where this is mentioned. ~ means your home directory so ~/go/bin is basically for macOS /Users/USERNAME/go/bin/.

Something seems weird, have the docs been updated (in this case the current wails docs page seems correct)? Last time I checked the wails docs mentioned /usr/local/go or maybe I mixed up something.

Usually many macOS Users prefer installing packages by using the package manager "brew" instead of manual installation steps (official Go installation instructions), maybe this can be mentioned in the docs if it makes sense.

P.S. I just used the full path (/Users/USERNAME/...) for clarity and because the tilde variable expansion does not always work in all cases.

iocron avatar Mar 05 '24 00:03 iocron

It doesn't matter how you install Go, you will need to put Go's bin directory on your path or else you can't run anything you install via go install.

On my system, that's $GOPATH/bin.

leaanthony avatar Mar 05 '24 08:03 leaanthony

Works as described.

CleanShot 2024-05-18 at 00 18 18

mateothegreat avatar May 18 '24 05:05 mateothegreat