Vapor Hello Sample Won't Compile

swift run

....

Working copy of GitHub - apple/swift-nio-extras: Useful code around SwiftNIO. resolved at 1.10.2

Creating working copy for GitHub - apple/swift-log: A Logging API for Swift

Working copy of GitHub - apple/swift-log: A Logging API for Swift resolved at 1.4.2

[1529/1559] Compiling Vapor Application+HTTP+Client.swift

error: fatalError

Any idea?

Ubuntu 20.04.

Just follow the official tutorial. https://docs.vapor.codes/4.0/hello-world/

What's the full output? It looks like a lot is cut off.

Additionally which version of Swift is this using and what's the environment like? The compiler requires a lot of memory so if you're compiling on a DO machine for instance that has <2GB RAM and no swap enabled the compiler can just die

2 Likes

Yes. That was because lack of memory. The issue was fixed after I created a 1GB swap file.

how to create a swapfile