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

sass-convert not found #10

Open
valeriangalliat opened this issue May 1, 2015 · 18 comments
Open

sass-convert not found #10

valeriangalliat opened this issue May 1, 2015 · 18 comments

Comments

@valeriangalliat
Copy link
Member

Moved from SassDoc/sassdoc#376

@misscs:

I'm running into an issue where sass-convert cannot successfully run:

» [ERROR] Error: spawn bundle exec sass-convert ENOENT
    at exports._errnoException (util.js:742:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1038:32)
    at child_process.js:1129:20
    at process._tickCallback (node.js:372:11)
@misscs
Copy link

misscs commented May 1, 2015

Is this an issue with versions?

@valeriangalliat
Copy link
Member Author

It seems the sass-convert executable was not found on your system (using Bundler). It is required for SassDoc to handle Sass syntax.

The odd thing is it's supposed to give a more friendly error message when the executable was not found. Any idea @pascalduez? Looks like execp('bundle exec sass-convert -v') is okay, but spawn('bundle exec sass-convert') gives ENOENT. But if I'm right both execp and spawn should search in PATH... however the bundle exec will work only when executed from the directory containing a Gemfile if I'm right. But I don't get how it could be related to this bug.

@misscs, can you run bundle exec sass-convert -v, and echo '// test' | bundle exec sass-convert in your terminal, from the same directory you're running SassDoc from, and post the output?

@pascalduez
Copy link
Member

Yes, the Error message is supposed to be more explicit and clear, so there's an issue here.

For using .sass indented syntax with SassDoc you need to have Ruby Sass available in your PATH. Either globally, or in a local bundle.

@misscs What's your current setup ?

@rootical
Copy link

Hello guys, I seem to have the same after running (i am using indented syntax):

sassdoc ./**/*.sass

» [ERROR] Error: spawn bundle exec sass-convert ENOENT

bundle exec sass-convert -v
Sass 3.4.13 (Selective Steve)

sass -v
Sass 3.4.20 (Selective Steve)

sassdoc --version
2.1.18

Is there anything I can do with it?

@pascalduez
Copy link
Member

@rootical what's your current install of Sass ? Globally or locally (project folder) with bundler ?

@rootical
Copy link

In this particular case I've been executing sassdoc from the root where there's a bundler with gem 'sass-rails', '~> 5.0.3'. Tried upgrading to the latest with no result.

I've tried copying out the needed folder to some other destination, than docs are being successfully generated (in this case it appears to be using my global node-sass). So I am going to use this way so far :)

@pascalduez
Copy link
Member

sass-convert is checking for Ruby Sass either globally, or locally trough bundler.

So in a local project bundle exec sass-convert -v should return the version.

Nothing to do with node-sass or LibSass so far. Maybe you have Ruby Sass installed globally as well ?

Anyway, this hard dependency and binary checking is a total mess and really error prone. I would like to refactor all this and also be able to leverage LibSass if possible.
Or even better we should properly parse indented syntax and ditch our sass-convert along the way.

@ghost
Copy link

ghost commented Mar 10, 2016

Hi!
Got the issue on Windows 7 with Sass & bundle installed, with Ruby in my PATHs

> sass-convert -v
Sass 3.4.21 (Selective Steve)
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: spawn sass-convert ENOENT
    at exports._errnoException (util.js:856:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:474:9)
    at process._tickCallback (node.js:388:17)

@mnn
Copy link

mnn commented Jul 11, 2016

Hello, hit the same issue.

# bundle exec sass-convert -v
Sass 3.4.22 (Selective Steve)

# node convert.js
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn bundle exec sass-convert ENOENT
    at exports._errnoException (util.js:1007:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Windows 10, Sass available via bundler and path, yet it crashes :(.

@pascalduez
Copy link
Member

This seems to be mostly a Windows thing. Sadly I don't have an easy way at hand nor time to try to reproduce it. Help welcome.

@aboutqx
Copy link

aboutqx commented Feb 24, 2017

@dkfiresky the same issue.Seems can't launch sass-convert from script which using 'spawn '

@ghost
Copy link

ghost commented Feb 24, 2017

@aboutqx I'm a mac user now - that solved any issues 😁

@naicko
Copy link

naicko commented Mar 10, 2017

Same issue on Windows 10

Node version

λ npm -v
3.10.8

Sass-convert version

λ bundle exec sass-convert -v
Sass 3.4.23 (Selective Steve)

Global sass version

λ sass -v
Sass 3.4.23 (Selective Steve)

Global ruby version

λ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]

When running the gulp task with sass-convert

λ gulp convert

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn bundle exec sass-convert ENOENT
    at exports._errnoException (util.js:1026:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

@naicko
Copy link

naicko commented Mar 10, 2017

The sass-convert command works when I run it using it vanilla on the command line. So I created my gulp task like this, to convert scss to sass. It's not the best way to create a gulp sass-convert task, but it works for now. If anyone else on Windows has the same issue, here is my solution:

gulpfile.babel.js

'use strict';

import gulp from 'gulp';
import shell from 'gulp-shell';
import paths from 'vinyl-paths';
import del from 'del';


//
// Convert the bootstrap scss file to real sass files
//

// Run the sass-convert command using the shell
gulp.task('sass-convert', shell.task([
  'sass-convert -R scss --from scss --to sass'
]));

// Convert scss and move to sass folder
gulp.task('convert', ['sass-convert'], () => {
 
  // When the `sass-convert` task is done, load all the `.sass` files
  return gulp.src('./scss/**/*.sass')

     // Remove them from the `scss` folder
    .pipe(paths(del))

     // And move them to the sass folder
    .pipe(gulp.dest('./sass'));
});

@pascalduez
Copy link
Member

As previously stated, we don't have an easy solution to test this on Windows.
Looks like the exception is not even handled at https://github.com/SassDoc/sass-convert/blob/master/lib/index.js#L129

The weird thing is apparently running bundle exec sass-convert -v directly in your shell works well...

@vicatcu
Copy link

vicatcu commented Apr 4, 2018

How do you get sass-convert on linux these days? Follownig the rabbit trail for getting the sass command line tools leads to only getting two executables: sass and dart-sass in the standalone download from github...

@pascalduez
Copy link
Member

sass-convert was developped against Ruby Sass, now that it's deprecated and replaced by Dart Sass, I have no idea whether it would still work or not.
And to be honest, I would like to deprecate sass-convert as well, it's such a hack, no one want to spend time on it.

@IrynaVynnychenko
Copy link

It's doesn't work!!
You should close it on this website:
https://www.npmjs.com/package/sass-convert

It's convert only sass to the sass!

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

No branches or pull requests

9 participants