I'm using bash in windows.
Getting this error when trying to run a sass compiler command via gulp.
I have Ruby & Sass installed.
Sass works fine when running it manually.
Error: spawn ENOENT: missing the sass executable. Please install sass and make available on your PATH
I have included the directory of my ruby bin in the PATH var (system variables within Enviroment variables).
Anyone got any ideas?
I had the same issue, fixed it by typing this;
sudo gem install sass
Your gulp-ruby-sass task is probably configured to execute SASS using Bundler (a gem dependency manager). When you don't have Bundler installed, that execution will fail with the error message you've quoted. Check your task configuration for the parameter "bundleExec" and make sure it's set to false, that way gulp-ruby-sass will run the SASS command directly.
A reboot didn't fix it unfortunately.
I swapped out the gulp-ruby-sass for the gulp-sass plugin and all is working fine.
It's hardly a fix but it served as a solution for me.
Instead of installing ruby-sass, I simply ran
npm i -g sass
Then replaced "sass" in gulp.js to "sass.cmd" for Windows
For my case the error was:
gulp-notify: [Error running Gulp] Error: spawn sass ENOENT
To fix it, I did the following:
In your project root:
npm install --save-dev gulp-ruby-sass
Which installed: gulp-ruby-sass#1.0.5 node_modules/gulp-ruby-sass
Then:
sudo gem install sass
Related
I need help! I installed sass-autocompile in Atom. Created .scss file. But I have error when I want to compile it.
The problem is that node-sass is not installed in your system, you need to install (globally, so any application or command line execution could reference it without the full path to the binary file) it by running the following command:
npm install -g node-sass
Read more about installing node packages globally here.
Hope it helps.
Try to install node-sass globally. npm node sass
Install:
$ npm install -g node-sass
Check in command line:
$ node-sass -v
I am trying to install Gulp globally on a Windows 7 PC. In a command prompt I ran npm install gulp -gand it ran without any errors, although it did return the following warnings:
npm WARN install Couldn't install optional dependency: Failed to parse json
npm WARN install No data, empty input at 1:1
npm WARN install
npm WARN install ^
When I try to run gulp it says it is not recognized as an internal command.
If I check the %AppData%/npm directory, gulp.cmd is not there. Looking at all the answers to gulp command not found - error after installing gulp, I take it this is where it should be.
Any ideas what has gone wrong, or where I can look to see what has gone wrong?
When I tried to do a local install of gulp: npm install gulp, it actually showed an error:
Failed to Parse json... File:
C:\Users\username|AppData\Roaming\npm-cache\clone\1.0.2\package\package.json
When I deleted this file and retried the Global install, it then worked.
Most answers and solutions are related to OSX, it is focused in Windows 7:
I have installed Grunt & Grunt CLI globally. Then I did a npm install inside a project folder to install all dependencies.
No problems so far, but as soon as I try to run the "grunt build" command, I get this warning in my project:
Warning: You need to have Ruby and Sass installed and in your PATH for
this task to work. More info:
https://github.com/gruntjs/grunt-contrib-sass Use --force
to continue.
Ok. This worked for me:
1) Download Ruby from http://rubyinstaller.org/
2) When you install, check the 'PATH' option. This is the key.
3) Once installed, open the prompt (you can use interactive ruby) and write
gem install sass
Now it should work.
Let's consider that newbie people most of the time try to use these commands:
npm install ruby
npm install sass
It won't work.
Solution:
Download and install Ruby from here “http://rubyinstaller.org/”
Execute in a command prompt window “gem install sass”
Only downloading Ruby independently it works. If you try npm install ruby it won't work.
Hope it helps to solve this problem in your case.
To avoid the need of Ruby, you can try this:
npm uninstall --save grunt-contrib-sass
npm install --save node-sass grunt-sass
Source:
https://github.com/gruntjs/grunt-contrib-sass/issues/229#issuecomment-281284894
I have gulp set up and working fine on one machine.
I have copied the directory to another machine which includes the package.json file that includes all the project dependencies.
Each time I run 'gulp' on the new machine it runs through the task but always finishes with
Error: Gem sass is not installed.
I have run sudo npm install to install dependencies from the the package.json and even tried to run npm install --save-dev gulp-ruby-sass
ANy ideas? thanks
It looks like your project uses the ruby gem sass, which means you need to run the following on each machine:
[sudo] gem install sass
For a bit more info, SASS started as a ruby gem but libSass allows users to run SASS using other languages.
I am in the process of setting up a new Mac for work. I have installed Grunt & Grunt CLI globally. Then I did a npm install inside a project folder to install all dependencies.
No problems so far, but as soon as I try to run the sass:dist task, I get this warning:
Warning: You need to have Ruby and Sass installed and in your PATH for
this task to work. More info:
https://github.com/gruntjs/grunt-contrib-sass Use --force
to continue.
What I understand is that I need to have Ruby and Sass installed on a more global level for this task to run. As I am still pretty new to working with the terminal, I did a quick search to find out what PATH is - seems like its some system path (that can be changed) where important data is stored.
Does this mean I can simply do a sudo grunt install contrib-sass -g to resolve the issue? And what about Ruby – I always thought its already installed on OS X?
Ok I got it. I just had to install Sass using gem install sass and now everything is fine...couldn't be easier.
If you're on OSX El Capitan or Yosemite on Mac there seem to be an issue installing the gem.
Try
sudo gem install -n /usr/local/bin sass
Solution was from github.
You need to install Ruby and Sass as:
For Ruby use command
sudo apt-get install ruby-full
And for Sass use command
sudo gem install sass
grunt-sass documentation is not very clear. To avoid the need of Ruby, you can try this:
npm uninstall --save grunt-contrib-sass
npm install --save node-sass grunt-sass
Try this, It's work for me.
reference
You need to install Ruby and Sass as:
For Ruby use command
sudo apt-get install ruby-full
And for Sass use command
sudo gem install sass
Use grunt --force if you are using grunt.
If you want to run an application using grunt and a warning is occur like this. For ignoring this warning you can use --force.
Also simply brew install saas/sass/sass on Mac High Sierra (10.13.x)
I used Homebrew to install Ruby and then Ruby to install SASS. Probably only the best way to do it if you already use Homebrew, or want to start using it regularly...
brew install ruby
gem install sass