Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling ejs template #3

Open
mryarbles opened this issue Oct 31, 2016 · 1 comment
Open

Error compiling ejs template #3

mryarbles opened this issue Oct 31, 2016 · 1 comment

Comments

@mryarbles
Copy link

mryarbles commented Oct 31, 2016

This is the result of some console.logs I put in trying to figure out why this plugin is failing.

ejs-brunch
=======================
ejs compile { data: '<p>Hello</p>',
  path: 'web/static/templates/template.ejs',
  map: undefined }
=======================
=======================
ejs basePath web/static/templates/template.html.ejs
[ 'web/static/templates/template.html.ejs' ]
[TypeError: Path must be a string. Received undefined]

It turns out baseDir is coming up undefined for some reason. Handlebars-brunch works fine so I don't know why it's not finding the directory...

var baseDir = this.config.watched.find(d => parts.indexOf(d) > -1);
    console.log("baseDir:", baseDir); // "undefined"
@mryarbles
Copy link
Author

This is where the problem is:

var parts = filePath.split(path.sep);

path.sep = "" because I work on windows. But all of our project paths use "/" of course...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant