I have the most recent version of Xcode 9 installed and have reinstalled vapor with brew a couple times now, but I'm still getting the following error whenever I try to build/run/update the project.
Here's what I'm working with
1.) Vapor Toolbox: 3.1.2
2.) Apple Swift version 4.0 (swiftlang-900.0.43 clang-900.0.22.8)
Target: x86_64-apple-macosx10.9
3.) Xcode 9.0
Build version 9M136h
Error: Could not generate Xcode project: error: manifest parse error(s):
/var/folder/60/n3ldjzgs5vsg06v17_1yy44h0000gn/T/TemporaryFile.VwrbJo.swift:41:5
: error: argument 'targets' must preceed argument 'dependencies'
targets" [
^
error: The product dependency 'Vapor' was not found.
error: The product dependency 'FluentProvider' was not found.
error: The product dependency 'Testing' was not found.
Here is my Package.swift file. Looking at my original error, I did try switching the 'targets' and 'dependencies' order in which they appear in the file. This didn't solve anything and produced the following error message: error: argument 'dependencies' must precede argument 'targets'
Package.swift
let package = Package(
name: "test",
products: [
.library(name: "App", targets: ["App"]),
.executable(name: "Run", targets: ["Run"])
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", .upToNextMajor(from: "2.1.0")),
.package(url: "https://github.com/vapor/fluent-provider.git", .upToNextMajor(from: "1.2.0")),
],
targets: [
.target(
name: "App",
dependencies: ["Vapor", "FluentProvider"],
exclude: [
"Config",
"Public",
"Resources",
]
),
.target(name: "Run", dependencies: ["App"]),
.testTarget(name: "AppTests", dependencies: ["App", "Testing"])
]
)