Skip to content

"Unexpected reserved word..." error returned after gulp-haml build #86

@kaidez

Description

@kaidez

I'm trying to build out a .haml file using gulp-haml...test.haml builds test.html out to a html directory . After the build is done, test.html looks like this...

<pre class='error'>SyntaxError: Unexpected reserved word at Function.&lt;anonymous&gt;
  (/Users/me/hamlPractice/node_modules/gulp-haml/node_modules/haml/lib/haml.js:595:29)
  at execute (/Users/me/hamlPractice/node_modules/gulp-haml/node_modules/haml/lib/haml.js:602:8)   atFunction.render(/Users/me/hamlPractice/node_modules/gulphaml/node_modules/haml/lib/haml.js:587:12)
at hamlStream (/Users/me/hamlPractice/node_modules/gulp-haml/index.js:23:44)
at wrappedMapper (/Users/me/hamlPractice/node_modules/gulp-haml/node_modules/map-stream/index.js:84:19)
  at Stream.stream.write (/Users/me/hamlPractice/node_modules/gulp-haml/node_modules/map-stream/index.js:96:21)
  at write (/Users/me/hamlPractice/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
  at flow (/Users/me/hamlPractice/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
  at DestroyableTransform.pipeOnReadable   (/Users/me/hamlPractice/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:664:5)
at DestroyableTransform.emit (events.js:92:17)
</pre>

My Gulp file looks like this:

var gulp = require('gulp');
var haml = require('gulp-haml');

gulp.task('build', function () {
  gulp.src('file.haml')
    .pipe(haml())
    .pipe(gulp.dest('./html'));
});

My haml file looks like this...

!!!5
%html{:lang => "en"}
 %head
  %meta{:charset => "UTF-8"}/
  %title Test
%body
  %div{:class => "container"}
    %header
    %main
    %footer 

Using...
-gulp 3.8.8
-node 0.10.31
-Haml 3.1.7

I did a generic haml build outside of gulp to see if there were external issues outside of gulp or the plugin and the buld was OK...any help is appreciated. Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions