yeoman / generator-webapp

A gulp.js generator for modern webapps
3.77k stars 708 forks source link

bower install not creating bower_component directory when bootstrap4 chosen #697

Closed ghost closed 4 years ago

ghost commented 6 years ago

Hey there, I'm using the webapp generator. When I go through the options to build the app and choose bootstrap3 all directories and dependencies are included in the app and gulp will serve the project. However, if I opt for bootstrap4 the app builds without the bower_component directory (It is nowhere in the project) and gives me these error details:-

`bower bootstrap#~4.0.0-alpha.6 EMALFORMED Failed to read /tmp/user/bower/ca4c50b905dc21ea17a10549a6f5944f-4508-4oZyyf/bower.json

Additional error details: Unexpected token @ in JSON at position 0 events.js:182 throw er; // Unhandled 'error' event ^

Error: Error: bootstrap is not installed. Try running bower install or remove the component from your bower.json file. at /usr/local/lib/node_modules/generator-webapp/node_modules/wiredep/wiredep.js:30:56 at /usr/local/lib/node_modules/generator-webapp/node_modules/wiredep/lib/detect-dependencies.js:149:29 at /usr/local/lib/node_modules/generator-webapp/node_modules/lodash/lodash.js:4944:15 at baseForOwn (/usr/local/lib/node_modules/generator-webapp/node_modules/lodash/lodash.js:3001:24) at /usr/local/lib/node_modules/generator-webapp/node_modules/lodash/lodash.js:4913:18 at Function.forEach (/usr/local/lib/node_modules/generator-webapp/node_modules/lodash/lodash.js:9359:14) at detectDependencies (/usr/local/lib/node_modules/generator-webapp/node_modules/wiredep/lib/detect-dependencies.js:34:7) at wiredep (/usr/local/lib/node_modules/generator-webapp/node_modules/wiredep/wiredep.js:70:39) at module.exports.end (/usr/local/lib/node_modules/generator-webapp/app/index.js:362:5) at Object. (/usr/local/lib/node_modules/generator-webapp/node_modules/yeoman-generator/lib/index.js:417:23) ` Any help greatly appreciated. Thanks!

S4nG0 commented 6 years ago

This is happening because Bootstrap is no longer being published to Bower.

ghost commented 6 years ago

@S4nG0 Do you know if yeoman will be replacing bower with another package manager? Or if running another package manger with webapp will achieve the same thing? It was working a couple of months ago when I had built it with bootstrap4. I understand bower has become deprecated, but it's a little annoying bv4 isn't published when yeoman still gives the option. Much thanks for the reply! I spent far too long trying to troubleshoot it before posting here.

S4nG0 commented 6 years ago

@sticky00 No worries, I've been facing the same issues as you. It was working perfectly fine a couple of weeks ago until I realized that installing bower components would always fail when installing the bootstrap 4 package. I tried to seek workarounds until I came across a post from a BT4 dev which stated that they had dropped BT4 support for bower and that people should install the package via npm.

I've been scratching my head at trying to make it work with webapp but I guess we'll have to wait for an update from the devs of this app. Until then, I'm simply downloading BT4 sources as a workaround.

ghost commented 6 years ago

Thanks @S4nG0 , saved me some cyclical headbanging.. Would be so good if they introduced a different framework altogether.

UlisesGascon commented 4 years ago

Bower wasn't supporting Bootstrap4. This was fixed in #737 😉