Error: spawn ENOENT: missing the sass executable
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.
Getting errors while installing node-sass
Just change the node version to v14.x.x
Or you may try installing newer versions of node-gpy
Here, read this issue:
https://github.com/sass/node-sass/issues/3117
How do I debug Error: spawn ENOENT on node.js?
How to research the spawn call raising the error:
- Use NODE_DEBUG=child_process, Credits to @karl-richter. Simple, quick, October 2019
- Use a wrapper to decorate
child_process.spawn
, Credits to @jiaji-zhou. Simple, quick, January 2015 - Long procedure, credits to @laconbass. Complex, time-cost, December 2014
Known, usual causes
Environment issues
- The command executable does not exist within the system (dependency not being installed). see prominc's answer
- The command executable does not exist within a directory of those specified by
PATH
environment variable. - The executable binary was compiled with uncompatible libraries. see danilo-ramirez answer
Windows-only bugs/quirks
- '.cmd' extension / shell: true. see li-zheng answer
- Administrator permisions. see steve's answer
Wrong
spawn('command', ['--argument', 'list'], { cwd, env, ...opts })
usage- Specified working directory (
opts.cwd
) does not exist · see leeroy-brun's answer - Argument list within command
String
spawn('command --wrong --argument list')
- Env vars within command string
spawn('ENV_VAR=WRONG command')
- Argument list
Array
specified asString
spawn('cmd', '--argument list')
- Unset
PATH
env variable=>spawn('cmd', [], { env: { variable } }
spawn('cmd', [], { env: { ...process.env, variable } }
- Specified working directory (
There are 2 posible origins for
ENOENT
:When origin is code you depend on, usual cause is an Environment Issue (or windows quirk)
- Code you are writing
- Code you depend on
Node.js: Python not found exception due to node-sass and node-gyp
Node-sass tries to download the binary for you platform when installing. Node 5 is supported by 3.8 https://github.com/sass/node-sass/releases/tag/v3.8.0
If your Jenkins can't download the prebuilt binary, then you need to follow the platform requirements on Node-gyp README (Python2, VS or MSBuild, ...)
If possible I'd suggest updating your Node to at least 6 since 5 isn't supported by Node anymore.
If you want to upgrade to 8, you'll need to update node-sass to 4.5.3
Related Topics
How to Scrape a Website with The Socksify Gem (Proxy)
Rails3 Scope for Count of Children in Has_Many Relationship
Dynamic Role Attributes in Chef
Alias_Method on Activerecord::Base Results in Nameerror
Difference Between "Class A; Class B" and "Class A::B"
List Array of Days Between Two Dates
How to Remove Header and Footer from Some of The Pages in Ruby on Rails
Clean Install Osx 10.9.1 Returns "Undefined Method 'Path2Class'" When Trying to Install Gems
When Is The Enumerator::Yielder#Yield Method Useful
How to Remove Backslashes from a JSON String
Capistrano, Firewalls and Tunnel
How to Show Longer Traces in Rails Testcases
Running Capybara Without Rack Produces Errors When Using Url Parameters