Chapter 5 – Dependency not found

When trying to deploy my application I get the following error:

/vapor/til-backend-production/code/.build/checkouts/vapor.git-5492988889259800272: error: noManifest(baseURL: "https://github.com/vapor/vapor.git", version: Optional("3.0.8"))
/vapor/til-backend-production/code/.build/checkouts/fluent-sqlite.git--5503918280859119093: error: noManifest(baseURL: "https://github.com/vapor/fluent-sqlite.git", version: Optional("3.0.0"))
'TILApp' /vapor/til-backend-production/code: error: product dependency 'FluentSQLite' not found
'TILApp' /vapor/til-backend-production/code: error: product dependency 'Vapor' not found

Can anybody explain why? I’m not sure why the version is optional. Any help would be appreciated.

@0xtim Can you please help with this when you get a chance? Thank you - much appreciated! :]

2 Likes

@p3scobar

Does it work ok on your local machine? What build type (i.e. incremental, update, clean) did you use when you deployed?

Can you post the contents of your Package.swift file?

Thanks for the reply. Yes, it works locally. I have tried all 3 deployment types. My package.swift is the same as the swift file included with the book:

// swift-tools-version:4.1
import PackageDescription

let package = Package(
    name: "TILApp",
    dependencies: [
        .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
        .package(url: "https://github.com/vapor/fluent-sqlite.git", from: "3.0.0"),
        ],
    targets: [
        .target(name: "App", dependencies: ["FluentSQLite", "Vapor"]),
        .target(name: "Run", dependencies: ["App"]),
        .testTarget(name: "AppTests", dependencies: ["App"]),
        ]
)

@p3scobar I just took a look at your application. The problem is you don’t have a .gitignore file. This means your .build folder are added to git, and all files compiled for mac.

So what your want to do is, add .gitignore file, you can take this: https://github.com/vapor/api-template/blob/master/.gitignore

After this make sure to wipe .build from git

git rm --cached .build -r

Then commit, push and redeploy.

1 Like

Brilliant. That worked. Thanks for the help.

1 Like