yeoman / generator-polymer

Scaffold out a Polymer project
http://polymer-project.org
926 stars 149 forks source link

Can't build after yo polymer #219

Closed Georges0013 closed 9 years ago

Georges0013 commented 9 years ago

Hi !

I have 2 problems with my first initialization with yo polymer. My specs :

     npm : 2.11.3
     yo : 1.4.7
     os : Ubuntu 12.04.5 LTS ARM

So first, after yo polymer, when I put a gulp serve, I've got this :

[12:50:15] Finished 'fonts' after 1.95 s
Unhandled rejection Error: spawn /home/georges/Downloads/Local_Google_Projects/Georges0013.github.io/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
    at child_process.js:1144:20
    at process._tickCallback (node.js:355:11)

I've patched this with this workaround : https://github.com/PolymerElements/polymer-starter-kit/issues/110#issuecomment-108185250 even with the latest generator-polymer.

Furthermore, I'm getting this error when I throw a build with gulp :

[12:51:24] Starting 'vulcanize'...
ERROR finding /home/georges/polymerProject/dist/bower_components/paper-drawer-panel/paper-drawer-panel.css
ERROR finding /home/georges/polymerProject/dist/bower_components/paper-item/paper-item-shared.css
ERROR finding /home/georges/polymerProject/dist/bower_components/paper-menu/paper-menu-shared.css
ERROR finding /home/georges/polymerProject/bower_components/page/page.js

but then, I can't find a solution about that ...

P.S.: I'm new with in the Polymer universe, and I'm very exciting to use it ! :)

arthurvr commented 9 years ago

Mind running bower install and trying gulp again? Looks like the bower components are missing. Were there any errors when scaffolding?

ragingwind commented 9 years ago

I recommend that use npm cache clean and then reinstall and build. It might be related to https://github.com/PolymerElements/polymer-starter-kit/issues/101#issuecomment-109605103

arthurvr commented 9 years ago

Closing for the lack of response. If you're still having this issue please report it at the PSK repo.

pantaluna commented 9 years ago

Problem: ERROR finding paper-drawer-panel.css paper-item-shared.css paper-menu-shared.css page.js

Solution: The gulpfile.js -> task copy needs to be corrected. The bower_components must be copied from the ./app directory.

OLD

var bower = gulp.src([
    'bower_components/**/*'
]).pipe(gulp.dest('dist/bower_components'));

NEW

    var bower = gulp.src([
        'app/bower_components/**/*'
    ]).pipe(gulp.dest('dist/bower_components'));
robdodson commented 9 years ago

bower_components shouldn't be in the app directory. Did you add a .bowerrc or do something to move them there?

pantaluna commented 9 years ago

@robdodson Thanks.

I started with the https://github.com/PolymerElements/polymer-starter-kit/releases/download/v1.0.3/polymer-starter-kit-light-1.0.3.zip which indeed includes a .bowerrc { "directory": "app/bower_components" } and the folder ./bower_components exists in ./app/ - The polymer-starter-kit-1.0.3.zip does not include a .bowerrc

I then used/modified the gulp script of the https://github.com/PolymerElements/polymer-starter-kit/releases/download/v1.0.3/polymer-starter-kit-1.0.3.zip The reason for this 2-step approach is a known issue, being that the complete polymer-starter-kit-1.0.3.zip does not work very well yet on a Windows dev machine (npm installs, such as web-component-tester failing, and some gulp tasks failing, mostly related to vulcanize) but I was able to resolve them one step at a time.

What should I do now? Putting ./bower_components in ./ or ./app/ ? I would like to stay as close as possible to the structure of the polymer-starter-kit.

robdodson commented 9 years ago

cc/ @addyosmani