deligenius / view-engine

🚀A Template View Engine for Deno frameworks
MIT License
54 stars 16 forks source link

Error in code "Property 'compile' does not exist on type '{}'" #5

Closed HaarisIqubal closed 4 years ago

HaarisIqubal commented 4 years ago

I am trying View Engine today recently I got stuck by this code as soon as I start the server

import {
    viewEngine,
    engineFactory,
    adapterFactory,
  } from "https://deno.land/x/view_engine/mod.ts";

const ejsEngine = engineFactory.getEjsEngine();
const oakAdapter = adapterFactory.getOakAdapter();

// require app

app.use(viewEngine(oakAdapter, ejsEngine));

Please fix this bug as soon as possible.

Screen Shot 2020-06-14 at 12 02 15 PM

gjuoun commented 4 years ago

You are using the Ejs engine, it's impossible to get error from handlebars.

HaarisIqubal commented 4 years ago

I know that not possible but its showing this on the terminal. While all the earlier project using view engine also showing same error.

gjuoun commented 4 years ago

Can you please provide some details so that I can reproduce the error? I've tried the code above, it has no problem on my pc. Maybe you need --reload your dependency.

HaarisIqubal commented 4 years ago

It works the newest version has solved the problem thanks for helping. Don't forget to watch our channel on youtube we are making a to-do app using View Engine.