Current ExecJS runtime does't support ES6
rake assets:precompile for my rails project throws below error:
rake aborted! Current ExecJS runtime does't support ES6. Please install latest Node.js.
Below is the environment information:
rails -v Rails 5.0.7 ruby -v ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] node -v v6.11.1
I tried reinstalling all my gems. But still, the error comes. OS is RHEL.
i had the same problem after upgrading autoprefixer-rails to Version 9.0.0. i fixed it by setting autoprefixer-rails to a pre 9 version:
gem 'autoprefixer-rails', '8.6.5'
in my Gemfile
Current ExecJS runtime does't support ES6. Please install latest , Hi There, Yesterday i opened a issue with the sprocket 4, that issue is solve. Now i get another error: Current ExecJS runtime does't support after nodejs installation, uninstall the gems and reinstall it again. mainly rubyracer or execjs. – Bijendra Jul 19 '18 at 9:10
I had a similar problem after upgrading to Rails 5.2
The solution for me was to add this line
# make the ExecJs use NodeJs ENV['EXECJS_RUNTIME'] = 'Node'
In this file
Then restart the rails server
# gem 'therubyracer', platforms: :ruby gem 'mini_racer', platforms: :ruby
$ bundle install
There's been a similar issue opened in the Autoprefixer-rails gem regarding this error, but it was thrown from an ActionView Template. keep an eye out for a response from the contributor:
commit rubygem-autoprefixer-rails for openSUSE:Factory, Package is "rubygem-autoprefixer-rails" Mon Aug 20 16:21:55 2018 rev:21 + "Please update or replace your current ExecJS runtime. Consider using 127.0 .0.1 (--binding option) => Ctrl-C to shutdown server [2015-01-24 14:32:37] INFO WEBrick 1.3.1 [2015-01-24 14:32:37] INFO ruby 2.1.5 (2014-11-13) [i386-mingw32] [2015-01-24 14:32:37] INFO WEBrick::HTTPServer#start: pid=4284 port=3000 Started GET "/" for 127.0.0.1 at 2015-01-24 14:37:02 -0500 Processing by Rails
Execjs Fastnode, Currently minimal effort is made to handle catastrophic errors: Node.js crashing, The goal of this endeavour is to give users a fast ExecJS runtime without after all steps I get this error Current ExecJS runtime does't support ES5. Please install node.js. (in C:/Sites/socify/app/assets/stylesheets/application.css.scss)