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

Execjs Errors Not Showing File Location #77

Open
henggana opened this issue Jun 28, 2016 · 8 comments
Open

Execjs Errors Not Showing File Location #77

henggana opened this issue Jun 28, 2016 · 8 comments

Comments

@henggana
Copy link

Hi, I did fresh install rails 4.2.5 with coffee-rails 4.1.0 and when there is syntax error on my .coffee file, the error only shows error message without the filename on which file the error happen.

SyntaxError: [stdin]:2:1: unexpected indentation

@henggana
Copy link
Author

I got the same error with you @tonydefaria . Somehow, the file is missing from the gem. I suggest you open new issue for this.

@kaspth
Copy link

kaspth commented Jun 30, 2016

It was fixed minutes ago: b3d64eb#diff-f84830974ae1c830a380311e98357d07R19

Please try 4.2.1 😁

@kaspth kaspth closed this as completed Jun 30, 2016
@rafaelfranca rafaelfranca reopened this Jun 30, 2016
@kaspth
Copy link

kaspth commented Jun 30, 2016

@henggana oh sorry, your original comment looks like it's referring to something else. I'd reopen but Rafael already did 😁

@prathamesh-sonpatki
Copy link
Member

@henggana Can you upload a sample application on Github that reproduces the issue? Thanks.

@raykin
Copy link

raykin commented Feb 9, 2017

got same error on custom precompile js on Rails4.2 and coffee-rails 4.2.1.
The last ten lines of stack trace

ExecJS::RuntimeError - SyntaxError: [stdin]:57:21: unexpected ->:
  execjs (2.7.0) lib/execjs/external_runtime.rb:84:in `extract_result'
  execjs (2.7.0) lib/execjs/external_runtime.rb:39:in `exec'
  execjs (2.7.0) lib/execjs/external_runtime.rb:21:in `eval'
  execjs (2.7.0) lib/execjs/external_runtime.rb:46:in `call'
  coffee-script (2.4.1) lib/coffee_script.rb:78:in `compile'
  sprockets (3.7.1) lib/sprockets/coffee_script_processor.rb:21:in `block in call'
  sprockets (3.7.1) lib/sprockets/cache.rb:85:in `fetch'
  sprockets (3.7.1) lib/sprockets/coffee_script_processor.rb:20:in `call'
  sprockets (3.7.1) lib/sprockets/processor_utils.rb:75:in `call_processor'
  sprockets (3.7.1) lib/sprockets/processor_utils.rb:57:in `block in call_processors'
  sprockets (3.7.1) lib/sprockets/processor_utils.rb:56:in `call_processors'

@rgaufman
Copy link

Same here, Rails 5.2.3, Coffee-Rails 5.0.0, getting this error:

     Failure/Error: asset_path(brand.logo)

     ActionView::Template::Error:
       SyntaxError: [stdin]:635:1: unexpected indentation
     # compile ((execjs):7528:19)
     # eval (eval at <anonymous> ((execjs):7539:8), <anonymous>:1:10)
     # (execjs):7539:8
     # (execjs):7545:14
     # (execjs):1:40
     # Object.<anonymous> ((execjs):1:58)
     # Module._compile (internal/modules/cjs/loader.js:776:30)
     # Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
     # Module.load (internal/modules/cjs/loader.js:643:32)
     # Function.Module._load (internal/modules/cjs/loader.js:556:12)
     # Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
     # internal/main/run_main_module.js:17:11
     # /usr/local/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'

No idea what file or line :(

@LissyTree
Copy link

Hi,
I'm having the same error, Rails 6.0.5, Coffee-Rails 5.0.0, using Node.js

ExecJS::RuntimeError: SyntaxError: [stdin]:26:1: unexpected indentation
compile ((execjs):7528:19)
eval (eval at ((execjs):7539:8), :1:10)
(execjs):7539:8
(execjs):7557:14
(execjs):1:40
Object. ((execjs):1:58)
Module._compile (node:internal/modules/cjs/loader:1105:14)
Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
Module.load (node:internal/modules/cjs/loader:981:32)
Function.Module._load (node:internal/modules/cjs/loader:822:12)
Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
node:internal/main/run_main_module:17:47
/Users/development/.rvm/gems/ruby-2.6.9/gems/execjs-2.8.1/lib/execjs/external_runtime.rb:39:in `exec'

This error occurred after updating from Rails 5.2 to Rails 6.0.
Is there any solution or hint to fix this?

@pgiblock
Copy link

pgiblock commented Sep 5, 2024

Still an issue 8 years later...

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

No branches or pull requests

8 participants