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

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

Open
kaidez opened this issue Sep 16, 2014 · 1 comment
Open

Comments

@kaidez
Copy link

kaidez commented Sep 16, 2014

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.

@PragmaticEd
Copy link

How is this open for so many years already?

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

2 participants