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

error: dependency 'CouchDB' in target 'xxx' requires explicit declaration #114

Open
Haibo-Zhou opened this issue Jun 25, 2020 · 1 comment

Comments

@Haibo-Zhou
Copy link

Haibo-Zhou commented Jun 25, 2020

I get this error when running 'swift build' in terminal of Macbook. What I suppose to change to fix it?

'KituraTIL' /Users/Chuck/KituraTIL: error: dependency 'CouchDB' in target 'KituraTIL' requires explicit declaration; reference the package in the target dependency with '.product(name: "CouchDB", package: "Kitura-CouchDB")'

`
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
// 1
name: "KituraTIL",
dependencies: [
// 2
.package(url: "https://github.com/IBM-Swift/Kitura.git",
.upToNextMajor(from: "2.0.0")),
// 3
.package(url: "https://github.com/IBM-Swift/HeliumLogger.git",
.upToNextMajor(from: "1.0.0")),
// 4
.package(url: "https://github.com/IBM-Swift/Kitura-CouchDB.git",
.upToNextMajor(from: "3.0.0"))
],
//5
targets: [
.target(name: "KituraTIL",
dependencies: ["Kitura" , "HeliumLogger", "CouchDB"],
path: "Sources")
]
)
`

@fabrijp
Copy link

fabrijp commented Feb 16, 2021

@Haibo-Zhou
A bit later but maybe someone still need it. You need to change your target ( //5 ) dependencies to:

.target( name: "KituraTIL", dependencies: ["Kitura","HeliumLogger",.product(name: "CouchDB", package: "Kitura-CouchDB")]),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants