mafintosh / pejs

Pre-compiled EJS with inheritance, block and file support that works both in the client and on the server
38 stars 6 forks source link

problem resolving paths #1

Open bazo opened 10 years ago

bazo commented 10 years ago

my file structure is

root
    - server.js
    - web/
        - templates/
           - index.ejs

i configured pejs with

{
    basedir: 'web/templates'
}

then when i do pejs.render('index') i always get Error: Cannot find module 'index'

i've tried to set the path to

web/templates
/web/templates
./web/templates

and also with trailing slash, nothing helps

where's the problem?

th-ch commented 9 years ago

Have you tried removing basedir config and using "./web/templates/index" as your path in render? It worked for me on a similar case.