No such module 'Rainbow'
AdrianBinDC opened this issue · comments
I followed the directions in the readme file and while I'm able to see Rainbow install when I add the .package(url: "https://github.com/onevcat/Rainbow", from: "3.0.0")
line to the dependencies array, I get No such module Rainbow
when I attempt to import it in main.swift
.
I tried adding it to targets, too, like so:
targets: [
.target(
name: "MyCLIUtility",
dependencies: ["SPMUtility", "Rainbow"]),
.testTarget(
name: "MyCLIUtilityTests",
dependencies: ["MyCLIUtility"]),
]
What am I missing?
May I know your entire package file?
Issue resolved :)
In order to get it working, after updating my package dependencies and targets, I ran the following commands after closing Xcode:
swift package update
swift package generate-xcodeproj
Then, when I re-opened the project in Xcode, it built without issue. I get spoiled with iOS projects :)
Uploaded a running example and it seems everything goes fine. You can just run swift run
to confirm it.
Oh,
Nice to hear that.