-
Notifications
You must be signed in to change notification settings - Fork 660
Vulcanize not working from gulpfile #62
Comments
I installed it on another machine, same problem exists for me. I am using Windows OS with node Ver. 0.12.2. |
I have the same problem. The command 'gulp' ends abruptly on vulcanize. Same thing happens when I do 'gulp serve:dist'. It ends abruptly on vulcanize just like the screenshot posted by devAtPolydeals. |
Are you using Windows too @manustays? |
I tried to then run vulcanize directly on the file, it gave me an error saying ".../bower_components/page/page.js" not found. I manually copied the folder in 'dist' directory, ran vulcanize again and it worked. @manustays, can you run vulcanize independently and see if you have the same problem? |
@wq9 Thanks for the additional details. Just to confirm, the elements are getting correctly vulcanized in elements.vulcanized.html as long as the inlineCss and inlineScripts options are disabled?. @devAtPolydeals as it looks like this is working on Windows without the two options above can you try that too? It'll help us narrow down where things are breaking. |
@addyosmani no unfortunately it did not. gulp.task('vulcanize', function () {
var DEST_DIR = 'dist/elements';
return gulp.src('dist/elements/elements.vulcanized.html')
.pipe($.vulcanize({
dest: DEST_DIR,
strip: true
}))
.pipe(gulp.dest(DEST_DIR))
.pipe($.size({title: 'vulcanize'}))
.on( "error", function( err ) {
console.log( err );
});
}); |
.pipe($.vulcanize({
//abspath: 'C:\\',
//strip: true,
//inlineCss: true,
//inlineScripts: true,
stripComments: true,
//excludes: [],
}))
.on( "error", function( err ) {
console.log( err );
})
.pipe(gulp.dest('dist/elements'))
.pipe($.size({title: 'vulcanize'})); @addyosmani The elements are correctly vulcanized when those inline options are disabled like above. |
@wq9 ... it didn't work for me. I get below blob: |
@devAtPolydeals It's probably because of the spaces in the file path in |
@wq9 good point. Yes, i concur that vulcanize itself works fine. |
OK, I know what's the problem. In Vulcanize doesn't work with So I put vulcanize.process("dist/elements/elements.vulcanized.html", function (err, inlinedHtml) { and it worked... |
@wq9 where did you put
|
@devAtPolydeals I put that line in |
Hi @addyosmani, I'm using Linux (Ubuntu 14.04) with gulp v3.8.11 & node v0.13.0-pre. After adding error handling function in gulpfile.js (as per @devAtPolydeals) without commenting out any line, I get the following error message:
Even after commenting out strip, inlineCss and inlineScripts, I get the same error. When I run vulcanize independently on index.html (vulcanize -v index.html), at first I got the error that folder 'bower_components' not found in the 'app' folder. After copying 'bower_components', the vulcanize command works as expected. The command
works fine. |
UPDATE: Issue resolved. My issue was simple: I was using path where a folder name contained space. Gulp was converting it into %20 and was failing. Thanks a lot guys for putting your time into our issues :) |
@wp9 you were right, my issue was resolved after i deployed it in C:\wamp\www... i think the spaces in folder name is messing up vulcanize and i had to change the vulcanize gulp task to:
I am closing this issue, unless someone wants to adds to it? For some one who lands on this page in future; to fix vulcanizing issue in windows do following:
|
FWIW, I had the First run:
Second run, I got the above plus:
Made no code changes in between runs. After the first run, |
Does anyone know why leaving the inlineCss and inlineScripts properties in the vulcanize config gives the no resolver found error? |
Hey folks, The two issues I'm seeing here are: 1) Vulcanize isn't working if there's a space in your paths (this may be Gulp specific, rather than an issue with Vulcanize) and 2) it won't correctly vulcanize if Would it be possible for you to try posting about these issues upstream on the relevant issue tracker with as much information as possible so that we can nail down if this is a bug that needs fixing there? We're using Vulcanize through gulp-vulcanize so failing the issue there it'll either be an issue with the plugin or our use of it. https://github.com/Polymer/vulcanize |
There are issues after u gulp with vulcanize on windows box. Update gulp-vulcanize and change the script to below, this should fix it.
|
@devAtPolydeals Without fix I'm getting: [08:27:19] Using gulpfile ~\Documents\psk\gulpfile.js |
i googled and found this solution: it solved my issue with just add
|
That solved the issue for me. |
Confirming that exclude fonts.googleapis.com fixed the problem on my Windows box as well. |
gulp created the elements.vulcanized.html file in my 'dist' folder but did not actually vulcanize it, elements.vulcanized.html and elements.html have the same content.
Looking further i found that gulp ends abruptly on vulcanize. See screenshot
The text was updated successfully, but these errors were encountered: