tj / ejs

Embedded JavaScript templates for node
4.47k stars 512 forks source link

ReferenceError: EJS is not defined #221

Open mKontakis opened 8 years ago

mKontakis commented 8 years ago

I am trying to update an element on the ejs file.

I try to do it like this:

var ejsFile= new EJS({url: 'views/profile.ejs'}).update('divResults', response);

on top of the file i have this

var ejs = require('ejs');

although i get ReferenceError: EJS is not defined. Any ideas?

mde commented 8 years ago

You are probably looking at docs for the wrong EJS. (There are multiple projects.) In addition, this EJS project is no longer active. The current version of EJS lives here: github.com/mde/ejs Doc site is here: http://ejs.co/

mKontakis commented 8 years ago

As i can see there is no update method anymore, do you kno how i can update the template?