Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic error when the gem is not installed #75

Open
navarroaxel opened this issue Sep 22, 2016 · 5 comments
Open

Generic error when the gem is not installed #75

navarroaxel opened this issue Sep 22, 2016 · 5 comments

Comments

@navarroaxel
Copy link

When the scss_lint gem is not installed, the error message is Fatal undefined

I have been looking for the error and I found this:

 stream.emit('error', err);

Line 36 at lint function at src/index.js file.

Any ideas how to fix it?

Versions:
[email protected]
[email protected]
[email protected]
[email protected]

@juanfran
Copy link
Owner

it's working for me.

The error is in command.js, error code 127.

@navarroaxel
Copy link
Author

I tested it on Windows 10 and Jenkins/Red hat server. The error code is 1 in windows. In red hat I don't know.

@raahede
Copy link

raahede commented Nov 23, 2016

👍

@raahede
Copy link

raahede commented Nov 23, 2016

I got this to work. In the gulp-scss-lint installation guide it specifies

This plugin requires Ruby and scss-lint
gem install scss_lint

I added this to my package.json, and after running npm install again it works.

"scripts": {
  "preinstall": "sudo gem install scss_lint",
},

peterkelly added a commit to peterkelly/gulp-scss-lint that referenced this issue Jul 3, 2017
@peterkelly
Copy link

I have just submitted a pull request to fix this; here's how to reproduce the problem:

$ docker run --rm -it node:8.1.2 bash
echo -e "\nHost github.com\nStrictHostKeyChecking no\n" >> /etc/ssh/ssh_config
git clone https://github.com/juanfran/gulp-scss-lint
cd gulp-scss-lint
npm install
npm test

which produces the output:

root@aca3e059ccc3:/gulp-scss-lint# npm test
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~pretest: [email protected]
npm info lifecycle [email protected]~test: [email protected]

> [email protected] test /gulp-scss-lint
> mocha



  gulp-scss-lint
Fatal undefined

with the fix in place, the output shows the correct error message:

root@08553316bc9d:/gulp-scss-lint# npm test
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~pretest: [email protected]
npm info lifecycle [email protected]~test: [email protected]

> [email protected] test /gulp-scss-lint
> mocha



  gulp-scss-lint
Fatal Error: Unhandled "error" event. (You need to have Ruby and scss-lint gem installed)
    at Stream.emit (events.js:185:19)
    at /gulp-scss-lint/src/index.js:36:16
    at tryCatcher (/gulp-scss-lint/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/gulp-scss-lint/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/gulp-scss-lint/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/gulp-scss-lint/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/gulp-scss-lint/node_modules/bluebird/js/release/promise.js:689:18)
    at Async._drainQueue (/gulp-scss-lint/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/gulp-scss-lint/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/gulp-scss-lint/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
    at processImmediate [as _immediateCallback] (timers.js:733:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants