ChangeMenuBarColor icon indicating copy to clipboard operation
ChangeMenuBarColor copied to clipboard

Failed to resolve ChangeMenuBarColor v1.0.1 with SPM

Open krzysztof-dk opened this issue 3 years ago • 9 comments

Hi. I wanted to try your app but when I run mint run igorkulman/ChangeMenuBarColor I get:

🌱 Finding latest version of ChangeMenuBarColor
🌱 Cloning ChangeMenuBarColor v1.0.1
🌱 Resolving package
error: 'github.com_igorkulman_changemenubarcolor': Invalid manifest
/private/var/folders/n2/fy86_3m54b1fk3zkckvygpd80000gn/T/mint/github.com_igorkulman_ChangeMenuBarColor/Package.swift:4:8: error: no such module 'PackageDescription'
import PackageDescription
       ^
🌱 Encountered error during "swift package resolve". Use --verbose to see full output
🌱  Failed to resolve ChangeMenuBarColor v1.0.1 with SPM

Xcode is installed and I created a blank swift project just to be sure.

I'm running macOS 12.6 on m1 mackbook pro.

krzysztof-dk avatar Oct 17 '22 22:10 krzysztof-dk

I am also on macOS 12.6 on a M1 machine and it runs just fine

❯ mint run igorkulman/ChangeMenuBarColor
🌱 Finding latest version of ChangeMenuBarColor
🌱 Cloning ChangeMenuBarColor v1.0.1
🌱 Resolving package
🌱 Building package
🌱 Installed ChangeMenuBarColor v1.0.1
🌱 Running ChangeMenuBarColor v1.0.1...
OVERVIEW: A Swift command-line tool to create a custom menu bar color wallpaper for macOS Big Sur

Do you have Xcode installed and you opened it at least once so it installs all the needed stuff?

igorkulman avatar Nov 01 '22 07:11 igorkulman

I get the same issue. Fresh install of xcode (and opened), macOS 12.6.1, M1 Macbook Pro

% mint run igorkulman/ChangeMenuBarColor 🌱 Finding latest version of ChangeMenuBarColor 🌱 Cloning ChangeMenuBarColor v1.0.2 🌱 Resolving package error: 'github.com_igorkulman_changemenubarcolor': Invalid manifest /private/var/folders/lg/g88nx1p91gd0hthtqycfcj5r0000gn/T/mint/github.com_igorkulman_ChangeMenuBarColor/Package.swift:4:8: error: no such module 'PackageDescription' import PackageDescription ^ 🌱 Encountered error during "swift package resolve". Use --verbose to see full output 🌱 Failed to resolve ChangeMenuBarColor v1.0.2 with SPM

blakegonzales avatar Nov 01 '22 15:11 blakegonzales

Same issue, with Xcode opened.

leonjeger@leons-macbook-air ~ % mint run igorkulman/ChangeMenuBarColor Gradient "#F2660D" "#FFB200" "optional_path_to_your_wallpaper" 🌱 Finding latest version of ChangeMenuBarColor 🌱 Cloning ChangeMenuBarColor v1.0.3 🌱 Resolving package error: 'github.com_igorkulman_changemenubarcolor': Invalid manifest /private/var/folders/1q/6t619mvn3sx6zfmsg38nq7z40000gn/T/mint/github.com_igorkulman_ChangeMenuBarColor/Package.swift:4:8: error: no such module 'PackageDescription' import PackageDescription ^ 🌱 Encountered error during "swift package resolve". Use --verbose to see full output 🌱 Failed to resolve ChangeMenuBarColor v1.0.3 with SPM

Amusedspider33 avatar Dec 04 '22 22:12 Amusedspider33

Same thing here

taunnt avatar Dec 11 '22 00:12 taunnt

Same thing

ysomad avatar Dec 12 '22 16:12 ysomad

Found the solution!

Issue occurs when Swift doesn't find a location for Xcode, to fix this:

  1. Open Xcode
  2. Preferences -> Location
  3. Under Command Line Tools reselect whatever version you have
  4. mint run igorkulman/ChangeMenuBarColor should now work without any issues

chanleii avatar Jan 16 '23 12:01 chanleii

This looks like a stupid Xcode bug. Open Xcode, go to Preferences, Locations and in Command Line Tools select the current Xcode if if it is already selected. Selecting it again will actually change the path.

igorkulman avatar Feb 02 '23 16:02 igorkulman

I had the same issue, updating the location fixed the issue. I imagine this could be caused by people adding an empty Xcode.app to ~/Applications to be able to de-select the developer in Spotlight after installing Xcode Command Line Tools, which is required for things like Homebrew.

vegardx avatar Feb 10 '23 07:02 vegardx

"Found the solution!

Issue occurs when Swift doesn't find a location for Xcode, to fix this:

Open Xcode Preferences -> Location Under Command Line Tools reselect whatever version you have mint run igorkulman/ChangeMenuBarColor should now work without any issues"

This worked, thank you!!

brittanydoig avatar Nov 22 '23 21:11 brittanydoig