googlearchive / generator-angularfire

Yeoman generator for AngularFire: Angular + Firebase apps
190 stars 52 forks source link

Bootstrap not being installed correctly #59

Open dsifford opened 9 years ago

dsifford commented 9 years ago

After running a vanilla yo angularfire (aside from the package.json issue) bootstrap isn't being installed properly. When I grunt serve, the app fires, but the style is broken.

If I replace the bower-loaded bootstrap <script src> files with bootstrap from their CDN, it works fine.

Correction: Adding <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> to the <head> corrects the issue

katowulf commented 9 years ago

Did you also grunt? Can you provide version info with npm list -g --depth=0 and npm list --depth=0, as well as the output files and precise steps to repro?

dsifford commented 9 years ago

Nope, sure didn't (pretty new to the yeoman thing)

I was under the impression that everything was precompiled and ready to roll right out of the gate.

Let me delete my bootstrap CDN link and run grunt and see if my ignorance is to blame... Standby

dsifford commented 9 years ago
Running "useminPrepare:html" (useminPrepare) task
Warning: Cannot find module 'C:\Users\dereksifford\Documents\Local_Repos\hurtregistry\node_modules\grunt-usemin\lib\config\uglifyjs' Use --force to continue.

Aborted due to warnings.
katowulf commented 9 years ago

Hrm. Go ahead and follow the same steps as above (npm list, steps to repro, and so on) so I can try it out locally. This will turn out to be a lib dependency usemin needs. Check that you don't have a global install of uglifyjs (unlikely).

dsifford commented 9 years ago
$ npm list -g --depth=0
d:\Program Files\nodejs
├── bower@1.5.1
├── generator-angular@0.12.1
├── generator-angularfire@1.0.0
├── generator-gulp-angularfire@0.0.3
├── generator-karma@1.0.0
├── grunt-cli@0.1.13
├── gulp@3.9.0
├── gulp-cli@0.3.0
├── jshint@2.8.0
├── npm@2.14.0
└── yo@1.4.7
$ npm list --depth=0
hurtregistry@0.0.0 C:\Users\dereksifford\Documents\Local_Repos\hurtregistry
├── chalk@0.4.0
├── grunt@0.4.5
├── grunt-autoprefixer@2.2.0
├── grunt-concurrent@1.0.1
├── grunt-contrib-clean@0.6.0
├── grunt-contrib-concat@0.5.1
├── grunt-contrib-connect@0.9.0
├── grunt-contrib-copy@0.7.0
├── grunt-contrib-cssmin@0.12.3
├── grunt-contrib-htmlmin@0.4.0
├── grunt-contrib-imagemin@0.9.4
├── grunt-contrib-jshint@0.11.2
├── grunt-contrib-uglify@0.7.0
├── grunt-contrib-watch@0.6.1
├── grunt-filerev@2.3.1
├── grunt-google-cdn@0.4.3
├── grunt-karma@0.12.0
├── grunt-newer@1.1.1
├── grunt-ng-annotate@0.9.2
├── grunt-svgmin@2.0.1
├── grunt-usemin@3.1.0
├── grunt-wiredep@2.0.0
├── jasmine-core@2.3.4
├── jshint-stylish@1.0.2
├── karma@0.13.9
├── karma-jasmine@0.3.6
├── karma-phantomjs-launcher@0.2.1
├── load-grunt-tasks@3.2.0
├── phantomjs@1.9.18
└── time-grunt@1.2.1
georgeportillo commented 8 years ago

+1

Puigcerber commented 8 years ago

Temporary solution can be found in twbs/bootstrap/issues/16663 due to changes in the Bower specification bower/spec/pull/43. For now you need to override the bootstrap main adding the following to your bower.json:

  "overrides": {
    "bootstrap": {
      "main": [
        "dist/css/bootstrap.css",
        "dist/js/bootstrap.js",
        "less/bootstrap.less"
      ]
    }
  }
michaelbz1 commented 7 years ago

Hours and hours of time and finally solved. Thank God for this thread. A little more context is included below.

Thanks everyone for this!!

}, "appPath": "app", "moduleName": "myNewProjectApp",

"overrides": {
"bootstrap": {
  "main": [
    "dist/css/bootstrap.css",
    "dist/js/bootstrap.js",
    "less/bootstrap.less"
  ]
}

} }