Description of problem: nodejs-less should require nodejs-promise. Without it the included lessc binary will silently fail. Version-Release number of selected component (if applicable): 2.6.1 How reproducible: 100% Steps to Reproduce: 1. Install nodejs-less, do not install nodejs-promise 2. Invoke lessc with a test .less file Actual results: No error message, no output Expected results: Generated CSS on stdout
Upstream has `promise` listed as an optionalDependency, meaning that it should only be needed sometimes. Could you explain more about the failure? Please provide an example .less file and the command-line arguments you passed to it.
FWIW, I can prove that the following works without nodejs-promise installed: Create a file called test.less: ``` @bg: #a1a1a1; body { background: @bg; } ``` `less - < test.less` Works just fine, outputs: ``` body { background: #a1a1a1; } ``` So nodejs-promise is definitely not a strict requirement for Less.js, but if you can show me proof that it's not commonly-useful without it, I'll add a Recommends: npm(promise) to the dependencies so nodejs-promise will be added by default.
(In reply to Stephen Gallagher from comment #1) > Upstream has `promise` listed as an optionalDependency, meaning that it > should only be needed sometimes. Could you explain more about the failure? The method less.render() supports two signatures, one with callback and one with promise. Examples: 1) With callback: less.render('.class { width: (1 + 1) }', function(e, output) { console.log(output); }); 2) With promise: var promise = less.render('.class { width: (1 + 1) }'); promise.then(function(result) { console.log(result); }); /usr/bin/lessc uses the second form in lines 457 ff. Without node-promise installed the tool will not output any CSS or errors on my system. > Please provide an example .less file and the command-line arguments you > passed to it. I can reproduce it with any input, e.g.: echo '.class { width: 1+1 }' | lessc -
(In reply to Ingo van Lil from comment #3) > (In reply to Stephen Gallagher from comment #1) > > > Upstream has `promise` listed as an optionalDependency, meaning that it > > should only be needed sometimes. Could you explain more about the failure? > > The method less.render() supports two signatures, one with callback and one > with promise. Examples: > > 1) With callback: > > less.render('.class { width: (1 + 1) }', > function(e, output) { console.log(output); }); > > 2) With promise: > > var promise = less.render('.class { width: (1 + 1) }'); > promise.then(function(result) { console.log(result); }); > > /usr/bin/lessc uses the second form in lines 457 ff. Without node-promise > installed the tool will not output any CSS or errors on my system. > > > > Please provide an example .less file and the command-line arguments you > > passed to it. > > I can reproduce it with any input, e.g.: > > echo '.class { width: 1+1 }' | lessc - You're right. I was doing all of my testing against Node.js 5.10.1, which works fine without the promises module. Looks like F23 *does* need this as an explicit Requires:, which I will add right now.
nodejs-less-2.6.1-2.fc23.1 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6bb8d63389
nodejs-less-2.6.1-2.fc23.1 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6bb8d63389
nodejs-less-2.6.1-2.fc23.1 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.