Can't use bundler gems inside nodejs buildpack (using buildpack-multi) - heroku

I'm trying to deploy an app to Heroku that is using bundler to install SASS/Compass and gulp.js (with gulp-ruby-sass to build the CSS files on deploy. The Ruby buildpack executes first and installs the gems but bundle/vendor/bundle isn't added to the PATH while inside the nodejs buildpack. I can't seem to get Gulp to recognize the bundle command so that SASS/Compass can be called. gulp-ruby-sass will simply call "bundle exec" so even if the bundle command is available, the bundler executables don't necessarily need to be.
Gulp task:
gulp.task('styles', function() {
return gulp.src(paths.styles.src)
.pipe(sass({
compass: true,
bundleExec: true
}))
.pipe(minifyCSS())
.pipe(gulp.dest(paths.styles.dest));
});
My postinstall hook:
"postinstall": "echo $PATH && ./node_modules/.bin/bower install --allow-root && ./node_modules/.bin/gulp"
Relevant part of the deploy process (you can see I echo the PATH in the postinstall script to debug):
Fetching repository, done.
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 1.31 KiB | 0 bytes/s, done.
Total 12 (delta 9), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby
-----> Compiling Ruby
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.6.3
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Using chunky_png 1.3.0
Using sass 3.2.19
Using bundler 1.6.3
Using fssm 0.2.10
Using compass 0.12.5
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (0.78s)
Cleaning up the bundler cache.
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
PRO TIP: Specify a node version in package.json
See https://devcenter.heroku.com/articles/nodejs-support
-----> Defaulting to latest stable node: 0.10.33
-----> Downloading and installing node
-----> Restoring node_modules directory from cache
-----> Pruning cached dependencies not specified in package.json
-----> Exporting config vars to environment
-----> Installing dependencies
> App#0.0.1 postinstall /tmp/build_ea48c721ae490fe3e5860ba1bafed484
> echo $PATH && ./node_modules/.bin/bower install --allow-root && ./node_modules/.bin/gulp
/tmp/build_ea48c721ae490fe3e5860ba1bafed484/vendor/node/lib/node_modules/npm/bin/node-gyp-bin:/tmp/build_ea48c721ae490fe3e5860ba1bafed484/node_modules/.bin:/tmp/build_ea48c721ae490fe3e5860ba1bafed484/vendor/node/bin:/tmp/build_ea48c721ae490fe3e5860ba1bafed484/vendor/node/bin::/tmp/codon/vendor/bin:/app/bin:/usr/ruby1.9.2/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
bower foundation#* not-cached git://github.com/zurb/bower-foundation.git#*
bower foundation#* resolve git://github.com/zurb/bower-foundation.git#*
bower foundation#* download https://github.com/zurb/bower-foundation/archive/5.4.7.tar.gz
bower moment#~2.6.0 not-cached git://github.com/moment/moment.git#~2.6.0
bower moment#~2.6.0 resolve git://github.com/moment/moment.git#~2.6.0
bower angular#~1.3.0 not-cached git://github.com/angular/bower-angular.git#~1.3.0
bower angular#~1.3.0 resolve git://github.com/angular/bower-angular.git#~1.3.0
bower angular-route#~1.3.0 not-cached git://github.com/angular/bower-angular-route.git#~1.3.0
bower angular-route#~1.3.0 resolve git://github.com/angular/bower-angular-route.git#~1.3.0
bower jquery-waypoints#~2.0.5 not-cached git://github.com/imakewebthings/jquery-waypoints.git#~2.0.5
bower jquery-waypoints#~2.0.5 resolve git://github.com/imakewebthings/jquery-waypoints.git#~2.0.5
bower angular-resource#~1.3.0 not-cached git://github.com/angular/bower-angular-resource.git#~1.3.0
bower angular-resource#~1.3.0 resolve git://github.com/angular/bower-angular-resource.git#~1.3.0
bower angular-foundation#~0.2.0 not-cached git://github.com/pineconellc/angular-foundation-bower.git#~0.2.0
bower angular-foundation#~0.2.0 resolve git://github.com/pineconellc/angular-foundation-bower.git#~0.2.0
bower angular-pusher#~0.0.7 not-cached git://github.com/doowb/angular-pusher.git#~0.0.7
bower angular-pusher#~0.0.7 resolve git://github.com/doowb/angular-pusher.git#~0.0.7
bower jquery.lazyload#~1.9.3 not-cached git://github.com/tuupola/jquery_lazyload.git#~1.9.3
bower jquery.lazyload#~1.9.3 resolve git://github.com/tuupola/jquery_lazyload.git#~1.9.3
bower jquery-waypoints#~2.0.5 download https://github.com/imakewebthings/jquery-waypoints/archive/v2.0.5.tar.gz
bower moment#~2.6.0 download https://github.com/moment/moment/archive/2.6.0.tar.gz
bower angular-route#~1.3.0 download https://github.com/angular/bower-angular-route/archive/v1.3.0.tar.gz
bower angular#~1.3.0 download https://github.com/angular/bower-angular/archive/v1.3.0.tar.gz
bower angular-foundation#~0.2.0 download https://github.com/pineconellc/angular-foundation-bower/archive/v0.2.2.tar.gz
bower angular-resource#~1.3.0 download https://github.com/angular/bower-angular-resource/archive/v1.3.0.tar.gz
bower jquery.lazyload#~1.9.3 download https://github.com/tuupola/jquery_lazyload/archive/1.9.3.tar.gz
bower angular-pusher#~0.0.7 download https://github.com/doowb/angular-pusher/archive/v0.0.13.tar.gz
bower foundation#* extract archive.tar.gz
bower jquery-waypoints#~2.0.5 extract archive.tar.gz
bower angular-foundation#~0.2.0 extract archive.tar.gz
bower angular-route#~1.3.0 extract archive.tar.gz
bower angular-resource#~1.3.0 extract archive.tar.gz
bower angular-pusher#~0.0.7 extract archive.tar.gz
bower moment#~2.6.0 extract archive.tar.gz
bower angular#~1.3.0 extract archive.tar.gz
bower jquery.lazyload#~1.9.3 extract archive.tar.gz
bower angular-pusher#~0.0.7 resolved git://github.com/doowb/angular-pusher.git#0.0.13
bower angular#~1.2.0 not-cached git://github.com/angular/bower-angular.git#~1.2.0
bower angular#~1.2.0 resolve git://github.com/angular/bower-angular.git#~1.2.0
bower angular#~1.2.0 download https://github.com/angular/bower-angular/archive/v1.2.26.tar.gz
bower angular-resource#~1.3.0 resolved git://github.com/angular/bower-angular-resource.git#1.3.0
bower angular#1.3.0 not-cached git://github.com/angular/bower-angular.git#1.3.0
bower angular#1.3.0 resolve git://github.com/angular/bower-angular.git#1.3.0
bower angular#1.3.0 download https://github.com/angular/bower-angular/archive/v1.3.0.tar.gz
bower angular-route#~1.3.0 resolved git://github.com/angular/bower-angular-route.git#1.3.0
bower angular#~1.2.0 extract archive.tar.gz
bower angular#1.3.0 extract archive.tar.gz
bower angular-foundation#~0.2.0 resolved git://github.com/pineconellc/angular-foundation-bower.git#0.2.2
bower angular#>=1 not-cached git://github.com/angular/bower-angular.git#>=1
bower angular#>=1 resolve git://github.com/angular/bower-angular.git#>=1
bower angular#>=1 download https://github.com/angular/bower-angular/archive/v1.3.0.tar.gz
bower angular#>=1 extract archive.tar.gz
bower jquery-waypoints#~2.0.5 resolved git://github.com/imakewebthings/jquery-waypoints.git#2.0.5
bower jquery#>=1.8 not-cached git://github.com/jquery/jquery.git#>=1.8
bower jquery#>=1.8 resolve git://github.com/jquery/jquery.git#>=1.8
bower jquery#>=1.8 download https://github.com/jquery/jquery/archive/2.1.1.tar.gz
bower jquery#>=1.8 extract archive.tar.gz
bower jquery.lazyload#~1.9.3 resolved git://github.com/tuupola/jquery_lazyload.git#1.9.3
bower angular#~1.2.0 resolved git://github.com/angular/bower-angular.git#1.2.26
bower angular#~1.3.0 resolved git://github.com/angular/bower-angular.git#1.3.0
bower angular#1.3.0 resolved git://github.com/angular/bower-angular.git#1.3.0
bower foundation#* resolved git://github.com/zurb/bower-foundation.git#5.4.7
bower jquery#>= 2.1.0 not-cached git://github.com/jquery/jquery.git#>= 2.1.0
bower jquery#>= 2.1.0 resolve git://github.com/jquery/jquery.git#>= 2.1.0
bower jquery#>= 2.1.0 download https://github.com/jquery/jquery/archive/2.1.1.tar.gz
bower fastclick#>=0.6.11 not-cached git://github.com/ftlabs/fastclick.git#>=0.6.11
bower fastclick#>=0.6.11 resolve git://github.com/ftlabs/fastclick.git#>=0.6.11
bower jquery-placeholder#~2.0.7 not-cached git://github.com/mathiasbynens/jquery-placeholder.git#~2.0.7
bower jquery-placeholder#~2.0.7 resolve git://github.com/mathiasbynens/jquery-placeholder.git#~2.0.7
bower modernizr#>= 2.7.2 not-cached git://github.com/Modernizr/Modernizr.git#>= 2.7.2
bower modernizr#>= 2.7.2 resolve git://github.com/Modernizr/Modernizr.git#>= 2.7.2
bower jquery.cookie#~1.4.0 not-cached git://github.com/carhartl/jquery-cookie.git#~1.4.0
bower jquery.cookie#~1.4.0 resolve git://github.com/carhartl/jquery-cookie.git#~1.4.0
bower jquery-placeholder#~2.0.7 download https://github.com/mathiasbynens/jquery-placeholder/archive/v2.0.8.tar.gz
bower fastclick#>=0.6.11 download https://github.com/ftlabs/fastclick/archive/v1.0.3.tar.gz
bower modernizr#>= 2.7.2 download https://github.com/Modernizr/Modernizr/archive/v2.8.3.tar.gz
bower jquery.cookie#~1.4.0 download https://github.com/carhartl/jquery-cookie/archive/v1.4.1.tar.gz
bower fastclick#>=0.6.11 extract archive.tar.gz
bower jquery-placeholder#~2.0.7 extract archive.tar.gz
bower jquery#>= 2.1.0 extract archive.tar.gz
bower jquery.cookie#~1.4.0 extract archive.tar.gz
bower modernizr#>= 2.7.2 extract archive.tar.gz
bower angular#>=1 resolved git://github.com/angular/bower-angular.git#1.3.0
bower jquery-placeholder#~2.0.7 resolved git://github.com/mathiasbynens/jquery-placeholder.git#2.0.8
bower jquery.cookie#~1.4.0 resolved git://github.com/carhartl/jquery-cookie.git#1.4.1
bower jquery#>=1.2 not-cached git://github.com/jquery/jquery.git#>=1.2
bower jquery#>=1.2 resolve git://github.com/jquery/jquery.git#>=1.2
bower jquery#>=1.2 download https://github.com/jquery/jquery/archive/2.1.1.tar.gz
bower jquery#>=1.2 extract archive.tar.gz
bower fastclick#>=0.6.11 resolved git://github.com/ftlabs/fastclick.git#1.0.3
bower moment#~2.6.0 resolved git://github.com/moment/moment.git#2.6.0
bower modernizr#>= 2.7.2 resolved git://github.com/Modernizr/Modernizr.git#2.8.3
bower jquery#>=1.8 resolved git://github.com/jquery/jquery.git#2.1.1
bower jquery#>= 2.1.0 resolved git://github.com/jquery/jquery.git#2.1.1
bower jquery#>=1.2 resolved git://github.com/jquery/jquery.git#2.1.1
Please note that,
angular-pusher#0.0.13 depends on angular#~1.2.0 which resolved to angular#1.2.26
angular-resource#1.3.0, angular-route#1.3.0 depends on angular#1.3.0 which resolved to angular#1.3.0
app depends on angular#~1.3.0 which resolved to angular#1.3.0
angular-foundation#0.2.2 depends on angular#>=1 which resolved to angular#1.3.0
Resort to using angular#~1.3.0 which resolved to angular#1.3.0
Code incompatibilities may occur.
bower angular-pusher#~0.0.7 install angular-pusher#0.0.13
bower angular-resource#~1.3.0 install angular-resource#1.3.0
bower angular-route#~1.3.0 install angular-route#1.3.0
bower angular-foundation#~0.2.0 install angular-foundation#0.2.2
bower jquery-waypoints#~2.0.5 install jquery-waypoints#2.0.5
bower jquery.lazyload#~1.9.3 install jquery.lazyload#1.9.3
bower angular#1.3.0 install angular#1.3.0
bower foundation#* install foundation#5.4.7
bower jquery-placeholder#~2.0.7 install jquery-placeholder#2.0.8
bower jquery.cookie#~1.4.0 install jquery.cookie#1.4.1
bower fastclick#>=0.6.11 install fastclick#1.0.3
bower moment#~2.6.0 install moment#2.6.0
bower modernizr#>= 2.7.2 install modernizr#2.8.3
bower jquery#>=1.8 install jquery#2.1.1
angular-pusher#0.0.13 app/static/bower_components/angular-pusher
└── angular#1.3.0
angular-resource#1.3.0 app/static/bower_components/angular-resource
└── angular#1.3.0
angular-route#1.3.0 app/static/bower_components/angular-route
└── angular#1.3.0
angular-foundation#0.2.2 app/static/bower_components/angular-foundation
└── angular#1.3.0
jquery-waypoints#2.0.5 app/static/bower_components/jquery-waypoints
└── jquery#2.1.1
jquery.lazyload#1.9.3 app/static/bower_components/jquery.lazyload
angular#1.3.0 app/static/bower_components/angular
foundation#5.4.7 app/static/bower_components/foundation
├── fastclick#1.0.3
├── jquery#2.1.1
├── jquery-placeholder#2.0.8
├── jquery.cookie#1.4.1
└── modernizr#2.8.3
jquery-placeholder#2.0.8 app/static/bower_components/jquery-placeholder
jquery.cookie#1.4.1 app/static/bower_components/jquery.cookie
└── jquery#2.1.1
fastclick#1.0.3 app/static/bower_components/fastclick
moment#2.6.0 app/static/bower_components/moment
modernizr#2.8.3 app/static/bower_components/modernizr
jquery#2.1.1 app/static/bower_components/jquery
[17:37:38] Using gulpfile /tmp/build_ea48c721ae490fe3e5860ba1bafed484/gulpfile.js
[17:37:38] Starting 'scripts'...
[17:37:38] Starting 'styles'...
[17:37:38] 'styles' errored after 3.3 ms
[17:37:38] [gulp] Error in plugin 'gulp-ruby-sass': You need to have Ruby and Sass installed and in your PATH for this task to work.
at module.exports (/tmp/build_ea48c721ae490fe3e5860ba1bafed484/node_modules/gulp-ruby-sass/index.js:21:10)
at Gulp.<anonymous> (/tmp/build_ea48c721ae490fe3e5860ba1bafed484/gulpfile.js:29:11)
at module.exports (/tmp/build_ea48c721ae490fe3e5860ba1bafed484/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/tmp/build_ea48c721ae490fe3e5860ba1bafed484/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/tmp/build_ea48c721ae490fe3e5860ba1bafed484/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/tmp/build_ea48c721ae490fe3e5860ba1bafed484/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
at /tmp/build_ea48c721ae490fe3e5860ba1bafed484/node_modules/gulp/bin/gulp.js:129:20
at process._tickCallback (node.js:419:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
[17:37:49] Finished 'scripts' after 11 s
Any help is appreciated. I'm out of ideas.

Related

Npm generate error when installing module

This is error
npm WARN bootstrap#4.0.0-beta.2 requires a peer of popper.js#^1.12.3 but none is installed. You must install peer dependencies yourself.
How can I solve this error?
Peer dependencies are NO LONGER INSTALLED AUTOMATICALLY from version 3.0
https://github.com/npm/npm/releases/tag/v3.0.0
You have to install it manually and make it part of your npm package.
npm install popper.js#^1.12.3 --save

composer require bower-asset/bpmn-io/bpmn-js-in-color

How to use composer to install bpmn-io/bpmn-js-in-color.
With bower the command is:
bower install bpmn-io/bpmn-js-in-color
With composer it should be:
composer require bower-asset/bpmn-io/bpmn-js-in-color
But it is not working. Any ideas?

FlorientR/laravel-gentelella bootstrap.min.css not found

I installed FlorientR/laravel-gentelella, by cloning it with phpstrom.
I do not find the dir 'css' under 'public' Folder. So bootstrap.min.css (path: css/bootstrap.min.css) file is not loaded by the page.
What have I to do now? Pls help.
Run this:
npm install --global bower gulp
npm install
bower install
gulp

Using bower on Openshift Laravel Project

How to configure deploy file to run bower install on laravel project.
npm install from the app-root directory didn't work.
Bower depends mainly on node and npm, are you sure u have them installed? because npm install should do the initial trick

How to disable Visual Studio 2015 and above automatic bower install on solution load?

Whenever I open the solution in Visual Studio 2015 or 2017 RC it starts automatically running bower install on one of the projects. The bower install output can be seen in the Bower/NPM output under the Output view:
PATH=X:\iis\wwwroot\LeExampleProjectName\.\node_modules\.bin;%PATH%
"C:\Users\PC118\AppData\Roaming\npm\Bower.cmd" install --force-latest
bower angular#1.3.14 cached git://github.com/angular/bower-angular.git#1.3.14
bower angular#1.3.14 validate 1.3.14 against git://github.com/angular/bower-angular.git#1.3.14
bower bootstrap#3.3.2 cached git://github.com/twbs/bootstrap.git#3.3.2
bower bootstrap#3.3.2 validate 3.3.2 against git://github.com/twbs/bootstrap.git#3.3.2
bower moment#~2.10.3 cached git://github.com/moment/moment.git#2.10.6
bower moment#~2.10.3 validate 2.10.6 against git://github.com/moment/moment.git#~2.10.3
bower angular-sanitize#1.3.14 cached git://github.com/angular/bower-angular-sanitize.git#1.3.14
bower angular-sanitize#1.3.14 validate 1.3.14 against git://github.com/angular/bower-angular-sanitize.git#1.3.14
bower lodash#3.3.1 cached git://github.com/lodash/lodash.git#3.3.1
bower lodash#3.3.1 validate 3.3.1 against git://github.com/lodash/lodash.git#3.3.1
bower angular-ui-select#~0.12.0 cached git://github.com/angular-ui/ui-select.git#0.12.1
bower angular-ui-select#~0.12.0 validate 0.12.1 against git://github.com/angular-ui/ui-select.git#~0.12.0
bower angular-animate#1.3.14 cached git://github.com/angular/bower-angular-animate.git#1.3.14
bower angular-animate#1.3.14 validate 1.3.14 against git://github.com/angular/bower-angular-animate.git#1.3.14
bower angular-strap#2.2.0 cached git://github.com/mgcrea/angular-strap.git#2.2.0
bower angular-strap#2.2.0 validate 2.2.0 against git://github.com/mgcrea/angular-strap.git#2.2.0
bower selectize#0.8.5 cached git://github.com/brianreavis/selectize.js.git#0.8.5
bower selectize#0.8.5 validate 0.8.5 against git://github.com/brianreavis/selectize.js.git#0.8.5
bower microplugin#0.0.x cached git://github.com/brianreavis/microplugin.js.git#0.0.3
bower microplugin#0.0.x validate 0.0.3 against git://github.com/brianreavis/microplugin.js.git#0.0.x
bower jquery#>=0.6.0 cached git://github.com/jquery/jquery.git#2.1.4
bower jquery#>=0.6.0 validate 2.1.4 against git://github.com/jquery/jquery.git#>=0.6.0
bower sifter#0.3.x cached git://github.com/brianreavis/sifter.js.git#0.3.4
bower sifter#0.3.x validate 0.3.4 against git://github.com/brianreavis/sifter.js.git#0.3.x
bower jquery#>= 1.9.1 cached git://github.com/jquery/jquery.git#2.1.4
bower jquery#>= 1.9.1 validate 2.1.4 against git://github.com/jquery/jquery.git#>= 1.9.1
bower lodash#3.3.1 install lodash#3.3.1
bower moment#~2.10.3 install moment#2.10.6
bower angular-sanitize#1.3.14 install angular-sanitize#1.3.14
bower angular-ui-select#~0.12.0 install angular-ui-select#0.12.1
bower angular#1.3.14 install angular#1.3.14
bower selectize#0.8.5 install selectize#0.8.5
bower angular-animate#1.3.14 install angular-animate#1.3.14
bower microplugin#0.0.x install microplugin#0.0.3
bower sifter#0.3.x install sifter#0.3.4
bower angular-strap#2.2.0 install angular-strap#2.2.0
bower bootstrap#3.3.2 install bootstrap#3.3.2
bower jquery#>= 1.9.1 install jquery#2.1.4
lodash#3.3.1 bower_components\lodash
moment#2.10.6 bower_components\moment
angular-sanitize#1.3.14 bower_components\angular-sanitize
└── angular#1.3.14
angular-ui-select#0.12.1 bower_components\angular-ui-select
└── angular#1.3.14
angular#1.3.14 bower_components\angular
selectize#0.8.5 bower_components\selectize
├── jquery#2.1.4
├── microplugin#0.0.3
└── sifter#0.3.4
angular-animate#1.3.14 bower_components\angular-animate
└── angular#1.3.14
microplugin#0.0.3 bower_components\microplugin
sifter#0.3.4 bower_components\sifter
angular-strap#2.2.0 bower_components\angular-strap
└── angular#1.3.14
bootstrap#3.3.2 bower_components\bootstrap
└── jquery#2.1.4
jquery#2.1.4 bower_components\jquery
Is there a way to disable this automatic bower install? And other ways to configure it?
In VS 2017 and newer you can go to:
Tools -> Options -> Projects and Solutions -> Web Package Management -> Package Restore
And set to false the restores you do not want to happen on project open or save:
It seems it is not possible to disable this for a specific solution or project, but here is how you can disable it globally:
In VS, go to Tools > Options > Projects and Solutions > External Web Tools
Disable all search paths, in my case there were four of them
Note that the output window may display some errors during solution loading. In my case it complained about gulp not being found. This has no negative effects, however.
All tools work as expected when called from the command line.
You can exclude the bower.json file from your Visual Studio project, but keep it in the project directory to manually run bower.
In my own case (VS2015), I found a bogus package.json file in my project directory.
Removing the package.json file stopped bower from trying to run "npm install" every time I opened the project.
Just posting a more up to date solution for this problem, in case someone stumbles upon this post...
Tools -> Options -> Projects and Solutions -> Web Package Management -> Package Restore
And then turn the appropriate settings to "False".

Resources