tuplejump / play-yeoman

Play + Yeoman integration sbt and play plugins
Apache License 2.0
238 stars 57 forks source link

error on stb run #58

Closed sihingkk closed 9 years ago

sihingkk commented 10 years ago

after typing stp run I'm getting:

Loading "imagemin.js" tasks...ERROR

Error: Cannot find module 'imagemin-gifsicle'

and browser is unable ro get angular.js file...

sihingkk commented 10 years ago

The problem was missing dependency.

but still running by 'sbt run' browser doesn't see any javasript files..

Shiti commented 10 years ago

Can you post the sample app to github or the steps to reproduce this issue?

sihingkk commented 10 years ago

I just did

activator new example play-yeoman and than in example folder I run 'sbt' and 'yo angular'.

It seems that play routes are not handling bower files. If those information will be not enough to reproduce it - let me know I will put this project on github.

sihingkk commented 10 years ago

I think my version of yeoman creates different folder structure.

What version are you using? mine is 1.1.2

sihingkk commented 10 years ago

ok the problem was that my version of yeoman was puting files into /ui/bower_components folder - all I need was to remove bower_components from paths in html templates and add it to yeoman.devDirs.

howerver I'm not sure if I solved it without breaking bower flow.

Shiti commented 10 years ago

I think this is due to a change in yeoman angular generator. Earlier the bower_components were stored in ui/app/ directory so the plugin tries to fetch them from there. You can either overwrite the setting to point to ui/ in your build file or update bower configuration. Steps to update bower configuration:

  1. The directory where the components from bower are saved can be set in the file .bowerrc . You could modify that and run bower update.
  2. change appPath in bower.json
lsnpatryks commented 9 years ago

@Shiti is it possible to change where plugin looks for bower_components? (Of course to change app/bower_components to just bower_components. Because when I am changing directory in .bowerrc and additionally change Gruntfile.js to match those paths I have a problem when doing production version - all my vendor js are empty (because the plugin, which concatenates all the js still looks in the wrong place, as I suppose).

Shiti commented 9 years ago

@lsnpatryks you can add/update the following setting in application.conf instead

yeoman.devDirs=["ui/.tmp", "ui/app"]