0
votes

When i compile asset to run Project on ENV=production

RAILS_ENV=production bundle exec rake assets:precompile

Error :

ExecJS::ProgramError: RangeError: Maximum call stack size exceeded (in /home/kop/rails/donghoxteen/vendor/assets/javascripts/spree/frontend/all.js) token ((execjs)) skip_line_comment ((execjs):2359:14462) handle_slash ((execjs):2359:16320) next_token ((execjs):2359:17382) skip_line_comment ((execjs):2359:14521) handle_slash ((execjs):2359:16320) next_token ((execjs):2359:17382) skip_line_comment ((execjs):2359:14521) handle_slash ((execjs):2359:16320) next_token ((execjs):2359:17382) skip_line_comment ((execjs):2359:14521) handle_slash ((execjs):2359:16320) next_token ((execjs):2359:17382) skip_line_comment ((execjs):2359:14521) handle_slash ((execjs):2359:16320) /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:47:in rescue in block in call' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:44:inblock in call' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:75:in block in lock' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:73:incall' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:73:in Locker' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:73:inlock' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:43:in call' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/uglifier-2.7.1/lib/uglifier.rb:212:inrun_uglifyjs' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/uglifier-2.7.1/lib/uglifier.rb:179:in compile' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/uglifier_compressor.rb:25:inevaluate' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/tilt-1.4.1/lib/tilt/template.rb:103:in render' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/context.rb:197:inblock in evaluate' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/context.rb:194:in each' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/context.rb:194:inevaluate' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/bundled_asset.rb:25:in initialize' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/base.rb:377:innew' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/base.rb:377:in build_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/index.rb:94:inblock in build_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/caching.rb:58:in cache_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/index.rb:93:inbuild_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/base.rb:287:in find_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/index.rb:61:infind_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:211:in block in find_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:257:inbenchmark' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:210:in find_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:119:inblock in compile' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:118:in each' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:118:incompile' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:70:in block (3 levels) in define' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/rake/sprocketstask.rb:146:inwith_logger' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:69:in block (2 levels) in define' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/bin/ruby_executable_hooks:15:ineval' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/bin/ruby_executable_hooks:15:in <main>' V8::Error: Maximum call stack size exceeded at token (<eval>:1:0) at skip_line_comment (<eval>:2359:14462) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) at next_token (<eval>:2359:17382) at skip_line_comment (<eval>:2359:14521) at handle_slash (<eval>:2359:16320) /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:45:inblock in call' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:75:in block in lock' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:73:incall' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:73:in Locker' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:73:inlock' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/execjs-2.5.2/lib/execjs/ruby_racer_runtime.rb:43:in call' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/uglifier-2.7.1/lib/uglifier.rb:212:inrun_uglifyjs' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/uglifier-2.7.1/lib/uglifier.rb:179:in compile' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/uglifier_compressor.rb:25:inevaluate' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/tilt-1.4.1/lib/tilt/template.rb:103:in render' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/context.rb:197:inblock in evaluate' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/context.rb:194:in each' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/context.rb:194:inevaluate' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/bundled_asset.rb:25:in initialize' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/base.rb:377:innew' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/base.rb:377:in build_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/index.rb:94:inblock in build_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/caching.rb:58:in cache_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/index.rb:93:inbuild_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/base.rb:287:in find_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/index.rb:61:infind_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:211:in block in find_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:257:inbenchmark' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:210:in find_asset' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:119:inblock in compile' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:118:in each' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:118:incompile' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:70:in block (3 levels) in define' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-2.12.4/lib/rake/sprocketstask.rb:146:inwith_logger' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:69:in block (2 levels) in define' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/bin/ruby_executable_hooks:15:ineval' /home/kop/.rvm/gems/ruby-2.1.4@rails3213/bin/ruby_executable_hooks:15:in `' Tasks: TOP => assets:precompile (See full trace by running task with --trace)

in my file config env=Product :

  Rails.application.configure do
      config.cache_classes = false
      config.eager_load = false
      config.consider_all_requests_local       = true
      config.action_controller.perform_caching = false
      config.action_mailer.raise_delivery_errors = false
      config.active_support.deprecation = :log
      config.active_record.migration_error = :page_load
      config.assets.debug = true
      config.assets.raise_runtime_errors = true
    end

How to fix this error. pls Help me Tks all.

2

2 Answers

0
votes

Welcome to Stack Overflow. Your problem seems to be a stack overflow. That is, you have too many nested function calls.

Most likely, stack overflows are caused by unintended endless recursions. You can see that on repeating lines

...
at next token (<eval>:2359:17382)
at skip_line_comment (<eval>:2359:14521)
at handle_slash (<eval>:2359:16320)
...

You have to check, why they are called recursive and whether it is intended for them.

0
votes

I solved the very similar issues by deleting an empty js file referenced by application.js