igorkulman / ChangeMenuBarColor

Simple utility to change macOS Big Sur and Monterey menu bar color by appending a solid color or gradient rectangle to a wallpaper image
MIT License
970 stars 37 forks source link

Failed to resolve ChangeMenuBarColor v1.0.1 with SPM #67

Open gh-kdk opened 2 years ago

gh-kdk commented 2 years ago

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.

igorkulman commented 2 years ago

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?

blakegonzales commented 2 years ago

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

Amusedspider33 commented 1 year ago

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

taunnt commented 1 year ago

Same thing here

ysomad commented 1 year ago

Same thing

chanleii commented 1 year ago

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
igorkulman commented 1 year ago

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.

vegardx commented 1 year ago

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.

brittanydoig commented 1 year ago

"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!!