2

That's the error

Please choose which ViewRenderer you prefer, multiple are available: PlaintextRenderer, LeafRenderer.

that's my code in configure.swift

try services.register(LeafProvider())
config.prefer(LeafRenderer.self, for: TemplateRenderer.self)

Leaf added to Package.swift

.target(name: "App", dependencies: ["Vapor", "FluentSQLite", "Crypto", "Leaf"]),

Although I did vapor xcode , Build and Run as well , But it still refuses to work.

1 Answer 1

6
// As of Vapor 3.0.1 and Leaf 3.0.0-rc.2.2
config.prefer(LeafRenderer.self, for: ViewRenderer.self)
1
  • 1
    It should. How are you rendering your views ?
    – nathan
    May 6, 2018 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.