Vapor command line errors
Closed this issue · 2 comments
nmfzone commented
I've follow the instruction to use Vapor in my environment (ElementaryOS based on Ubuntu 14.04).
I'm using Swiftenv to manage swift. And my swift already shows that its version is
Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift fc261045a5)
Target: x86_64-unknown-linux-gnu
And below is the errors when i start type command vapor
, vapor new project-name
, etc.
/usr/local/bin/vapor:145:14: warning: extraneous '_' in parameter: 'command' has no keyword argument name
func run(_ command: String) throws {
^~
/usr/local/bin/vapor:163:14: warning: extraneous '_' in parameter: 'command' has no keyword argument name
func run(_ command: String, orFail errorMessage: String) {
^~
/usr/local/bin/vapor:177:15: warning: extraneous '_' in parameter: 'message' has no keyword argument name
func fail(_ message: String) {
^~
/usr/local/bin/vapor:101:17: error: use of undeclared type 'ErrorProtocol'
enum Error: ErrorProtocol {
^~~~~~~~~~~~~
/usr/local/bin/vapor:101:10: error: type 'Vapor.Error' does not conform to protocol 'RawRepresentable'
enum Error: ErrorProtocol {
^
Swift.RawRepresentable:9:20: note: protocol requires nested type 'RawValue'
associatedtype RawValue
^
/usr/local/bin/vapor:136:42: error: value of type '[String]' has no member 'joined'
print("Usage: \(arguments[0]) [\(names.joined(separator: "|"))]")
^~~~~ ~~~~~~
/usr/local/bin/vapor:149:25: error: thrown expression type 'Vapor.Error' does not conform to 'ErrorType'
throw Error.Cancelled
~~~~~~^~~~~~~~~
/usr/local/bin/vapor:151:25: error: thrown expression type 'Vapor.Error' does not conform to 'ErrorType'
throw Error.System(result)
~~~~~~^~~~~~~~~~~~~~
/usr/local/bin/vapor:198:30: error: value of type '[String]' has no member 'joined'
var buildFlags = flags.joined(separator: " ")
^~~~~ ~~~~~~
/usr/local/bin/vapor:229:30: error: value of type '[String]' has no member 'joined'
let flagString = flags.joined(separator: " ")
Anyone can give me a solution to my problem? Thanks.
loganwright commented
Hi @nmfzone
It looks like it's trying to run the vapor script with an older version of swift, can you try setting your swiftenv global to 05-03. Just enter this in the terminal:
swiftenv global DEVELOPMENT-SNAPSHOT-2016-05-03-a
nmfzone commented
Hi @loganwright
Yaaps, I'd already tried it. And you're right, the errors shows because i use the older version of swift, my bad.
Thank you, i appreciate your help.