-
Notifications
You must be signed in to change notification settings - Fork 705
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
Gulp html task got Unknown Word error #572
Comments
I'm curious about those conditional comments for IE7, as we don't have those. What did you change exactly and which version of generator did you scaffold your project with? |
I've got a similar error with v2.0.0 of the generator.
|
It looks like gulp-uglify is trying to parse HTML, I wonder why… Does this happen on fresh install or are there some steps to reproduce this? There have been few releases since v2.0.0, does upgrading and building again help? |
@silvenon I've encountered the same issue on a fresh install. After commenting out line 57 and 58 in |
@monomichael maybe, does it help to update gulp-if, if you don't already have the latest version? |
@silvenon Yes, it does. After updating |
Awesome! In the recent versions of generator-webapp we already have gulp-if updated, so hopefully this isn't an issue anymore. I will gladly reopen if someone still has problems with this. 😉 |
I still have the same problem eventhough i ihave gulp-if updated to 2.0.2 [21:39:12] CLI version 1.2.2 |
@sherifsaleh does this happen on a fresh install? Did you modify anything else? Is your gulp-useref up-to-date? |
i'm also having the same problem "gulp-if": "^2.0.2" |
@hamedtaha are you using the latest version of generator-webapp? |
Yes I have the latest 'web-app' generator |
@hamedtaha so this happens on a fresh install or did you modify anything? Could you paste your |
In my HTML code I've Used a code formatter plugin (in sublime text)
when i changed it to then the 'gulp' command went fine and it builds the 'dist' code , but without any js or css linking :( that also was strange |
I don't understand. The Could you paste your |
This: <!--
endbuild
--> couldn't have happened with our setup, you did that somehow. Maybe that's what was throwing gulp-useref off. How are background images related? Also, those URLs aren't processed in any way. |
sublime text HTML code formatting plugin caused that |
Ok, let's back up 😄 what is the issue exactly? |
:D |
But you said that it's working after fixing that |
yes after fixing the white spaces everything is working now |
I have the same problem, gulp-webapp downloaded on 21st march, a clean project without Bootstrap, Windows, `[20:05:42] Starting 'html'... events.js:160 |
@PlkMarudny looks like you have invalid javascript code |
I have just tried to build a clean project, no javascript on my own; scaffolder and tried to build. |
I recommend updating dependencies via |
I've execute gulp html inside of my new folder yeoman-webapp generated project
oyt@oyt:~/yeoman/new$ gulp html
[05:39:27] Requiring external module babel-register
[05:39:32] Using gulpfile ~/yeoman/new/gulpfile.babel.js
[05:39:32] Starting 'styles'...
[05:39:33] Starting 'scripts'...
[05:39:39] Finished 'styles' after 7.16 s
[05:39:40] Finished 'scripts' after 6.64 s
[05:39:40] Starting 'html'...
Then an error was appeared
events.js:160
throw er; // Unhandled 'error' event
^
Error: /home/oyt/yeoman/new/index.html:1:1: Unknown word> 1 |
| ^
2 |
3 |
I have checked anything related with it, fundamentally from gulp.task function inside of the gulpfile.babel.js but i don't understand yet. I have no change with my gulp html function task... (still default)
gulp.task('html', ['styles', 'scripts'], () => {$.if('*.html', $ .htmlmin({collapseWhitespace: true})))
return gulp.src('app/.html')
.pipe($.useref({searchPath: ['.tmp', 'app', '.']}))
.pipe($.if('.css', $.cssnano()))
.pipe(
.pipe(gulp.dest('dist'));
});
Beside of that, I have also checked the html file format and i think it's Okay (no error) with a sublime linter.
The text was updated successfully, but these errors were encountered: