clkz0r
clkz0r

Reputation: 13

No /bower_components/ in Yeoman Webapp

I'm new to command line and yeoman, but it's something I have been too to explore and decided to follow the introduction into getting started with a Yeoman webapp.

I made sure my Ruby, Compass, Git and NodeJS were all installed before installing Yeoman.

I successfully installed Yeoman and the Generator-webapp.

Then I ran yo webapp in a directory and pulled down a webapp with Bootstrap, Sass and Modernizr.

However it doesn't appear to have created a bower_components for my dependancies, because when I run ls this is what I see

Andrew-Clarks-MacBook:project1 clk$ ls
Gruntfile.js    app     bower.json  node_modules    package.json

Then when I run grunt serve i get the following errors

Andrew-Clarks-MacBook:project1 clk$ grunt serve
Running "serve" task

Running "clean:server" (clean) task

Running "concurrent:server" (concurrent) task

    Running "copy:styles" (copy) task


    Done, without errors.


    Execution Time (2014-04-18 04:28:49 UTC)
    loading tasks   4ms  ▇▇▇▇▇▇▇▇▇▇▇ 22%
    copy:styles    13ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 72%
    Total 18ms
        Warning: Syntax error: File to import not found or unreadable: ../../bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap.scss.
                  Load paths:
                    /Users/clk/Sites/project1
                    /Users/clk/Sites/project1/app/styles
                    /Users/clk/Sites/project1/bower_components
            on line 4 of app/styles/main.scss
      Use --trace for backtrace. Use --force to continue.

        Aborted due to warnings.


Execution Time (2014-04-18 04:28:46 UTC)
concurrent:server  4.2s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
Total 4.2s

When I run bower install to try and get them I get the following message

Andrew-Clarks-MacBook:project1 clk$ bower install
bower jquery#~1.11.0        not-cached git://github.com/jquery/jquery.git#~1.11.0
bower jquery#~1.11.0           resolve git://github.com/jquery/jquery.git#~1.11.0
bower modernizr#~2.6.2      not-cached git://github.com/Modernizr/Modernizr.git#~2.6.2
bower modernizr#~2.6.2         resolve git://github.com/Modernizr/Modernizr.git#~2.6.2
bower bootstrap-sass-official#~3.1.0       not-cached git://github.com/twbs/bootstrap-sass.git#~3.1.0
bower bootstrap-sass-official#~3.1.0          resolve git://github.com/twbs/bootstrap-sass.git#~3.1.0
bower jquery#~1.11.0                     ENORESTARGET No tag found that was able to satisfy ~1.11.0

Additional error details:
No versions found in git://github.com/jquery/jquery.git

If someone can help this command line / yeoman rookie (and i mean rookie) that would be fantastic.

Apologies if this query has come up before, I searched for a fair while before posting!

Upvotes: 0

Views: 3109

Answers (5)

SbnSeebee
SbnSeebee

Reputation: 64

There was an issue with webapp that looks to have been resolved in newer versions. webapp - relative references.

Also, you can check to see if you have bower installed:

bower -v    

If it is not installed then install it:

npm install -g bower

Upvotes: 0

Jx Prince
Jx Prince

Reputation: 11

Folks, i faced the same issue [ and am not familiar with GitBash] , but i managed to resolve it after i followed bower install procedure to manage third party dependencies. More help here https://github.com/yeoman/generator-webapp

Upvotes: 0

Milo
Milo

Reputation: 89

I had the same problem, everything was installed except the bower_components folder in the app folder. Untill I used GitBash instead of cmd, and it worked like a charm!

Upvotes: 0

webdigga
webdigga

Reputation: 371

I had a problem with the missing bower components folder and I changed from using the npm command line to GIT bash and then everything seems to work fine.

Upvotes: 1

Jason Wright
Jason Wright

Reputation: 31

Go into your main.scss file, and on line 4, change the ../../ part to just ../

The the bower_components file is found under app/bower_components.

../ takes you up one level from the directory that main.scss is in, which is in this case is app/styles.

../../ takes you up two levels, when you only need to go up one.

Not sure why when you run yo webapp it does that, I had the same problem. It must be to do with a the new update.

Upvotes: 3

Related Questions