mjmlio / gulp-mjml

Add Gulp to your MJML workflow!
MIT License
162 stars 37 forks source link

Problem with mj-include #8

Closed martinbertinat closed 7 years ago

martinbertinat commented 7 years ago

Hi, first thanks for the work.

I'm getting:

Starting 'mjml'... fs.js:584 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^

Error: ENOENT: no such file or directory, open './header.mjml' at Error (native) at Object.fs.openSync (fs.js:584:18) at Object.fs.readFileSync (fs.js:431:33) at /home/martin/vagrants/scotch/public/posada/node_modules/mjml-core/lib/includeExternal.js:25:33

In my mjml template I have:

Node version: v5.12.0

If you need more info just tell me. thanks

ngarnier commented 7 years ago

hey @martinbertinat, sorry for the late answer here. Was your issue solved in the meantime?

If not, can you please share the MJML causing this issue?

martinbertinat commented 7 years ago

Hello, I think it was a problem with the paths I used for the includes.

Thanks

jkudish commented 7 years ago

@martinbertinat do you mind sharing how you solved this? i've tried every path that could make sense and I can't get it to work 👎

Thanks!

jkudish commented 7 years ago

Got it to work, after posting, of course.

Had to include the full path from project root (which I had tried but forgot the ./ at the start the first time). I wish the path was relative...

martinbertinat commented 7 years ago

Hi @jkudish. I was writing that!

Thanks for posting the solution