Closed kimsanov closed 5 years ago
Can you share your whole Package.swift file?
My current Package is
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "Kimsapp-Stats",
dependencies: [
// 💧 A server-side Swift web framework.
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
// 🍃 An expressive, performant, and extensible templating language built for Swift.
.package(url: "https://github.com/vapor/leaf.git", from: "3.0.0"),
.package(url: "https://github.com/vapor/fluent-postgresql.git", from: "1.0.0-rc")
],
targets: [
.target(name: "App", dependencies: ["Leaf", "Vapor", "FluentPostgreSQL"]),
.target(name: "Run", dependencies: ["App"]),
.testTarget(name: "AppTests", dependencies: ["App"])
]
)
But I've also tried with new vapor project from web template. Result is the same. Here is Package.swift for empty project
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "TestMongo",
dependencies: [
// 💧 A server-side Swift web framework.
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
// 🍃 An expressive, performant, and extensible templating language built for Swift.
.package(url: "https://github.com/vapor/leaf.git", from: "3.0.0"),
],
targets: [
.target(name: "App", dependencies: ["Leaf", "Vapor"]),
.target(name: "Run", dependencies: ["App"]),
.testTarget(name: "AppTests", dependencies: ["App"])
]
)
Here is screenshot how error looks
When I manually add to Packege.swift
.package(url: "https://github.com/vapor-community/mongo-driver", from: "2.3.1")
and call
vapor fetch --verbose
It stucks after line with sqlite
vapor fetch --verbose Fetching Dependencies ... warning: 'fetch' command is deprecated; use 'resolve' instead Updating https://github.com/vapor/http.git Updating https://github.com/vapor/multipart.git Updating https://github.com/vapor/leaf.git Updating https://github.com/apple/swift-nio-ssl-support.git Updating https://github.com/vapor/console.git Updating https://github.com/vapor/routing.git Updating https://github.com/vapor/template-kit.git Updating https://github.com/apple/swift-nio-ssl.git Updating https://github.com/vapor/core.git Updating https://github.com/vapor/crypto.git Updating https://github.com/vapor/service.git Updating https://github.com/apple/swift-nio.git Updating https://github.com/vapor/database-kit.git Updating https://github.com/vapor/validation.git Updating https://github.com/apple/swift-nio-zlib-support.git Updating https://github.com/vapor/vapor.git Updating https://github.com/vapor/websocket.git Fetching https://github.com/vapor-community/mongo-driver Updating https://github.com/vapor/url-encoded-form.git Fetching https://github.com/vapor/fluent.git Fetching https://github.com/OpenKitten/MongoKitten.git Fetching https://github.com/vapor/node.git Fetching https://github.com/vapor/random.git Fetching https://github.com/vapor/sqlite.git
The problem is that this package is only compatible with Vapor 2, and you're trying to add it to a Vapor 3 project. There's no workaround, you will have to ignore this package and use MongoKitten 5 directly.
Got it. Thanks!
Xcode 11 Beta 6. When adding package gives error: