String interpolation fails
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, ruby
- Ambito
- tooling
Direzione di ricerca
Reproduce the failure with the shown JavaScript during rake assets:precompile, then inspect the ExecJS external_runtime.rb and the Uglifier compile path named in the stack trace. Confirm the cause and add coverage where the project tests this runtime or compilation path; done means JavaScript string interpolation no longer raises the reported syntax error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
When there is a javascript code that contains String interpolation an error is raised.
Given a piece of code such as this:
var a = 500
`${a}`
An error like this is raised:
Running: rake assets:precompile
rake aborted!
ExecJS::RuntimeError: SyntaxError: Unexpected character '`' (line: 49741, col: 12, pos: 1488821)
Error
at new JS_Parse_Error (/tmp/execjs20170131-467-r8rh5pjs:3623:11948)
at js_error (/tmp/execjs20170131-467-r8rh5pjs:3623:12167)
at parse_error (/tmp/execjs20170131-467-r8rh5pjs:3623:14184)
at Object.next_token [as input] (/tmp/execjs20170131-467-r8rh5pjs:3623:19902)
at next (/tmp/execjs20170131-467-r8rh5pjs:3623:21852)
at maybe_assign (/tmp/execjs20170131-467-r8rh5pjs:3624:3161)
at expression (/tmp/execjs20170131-467-r8rh5pjs:3624:3384)
at simple_statement (/tmp/execjs20170131-467-r8rh5pjs:3623:25942)
at /tmp/execjs20170131-467-r8rh5pjs:3623:23747
at /tmp/execjs20170131-467-r8rh5pjs:3623:22954
at block_ (/tmp/execjs20170131-467-r8rh5pjs:3623:28083)
at ctor.body (/tmp/execjs20170131-467-r8rh5pjs:3623:27686)
at function_ (/tmp/execjs20170131-467-r8rh5pjs:3623:27782)
new JS_Parse_Error ((execjs):3623:11948)
js_error ((execjs):3623:12167)
parse_error ((execjs):3623:14184)
Object.next_token [as input] ((execjs):3623:19902)
next ((execjs):3623:21852)
maybe_assign ((execjs):3624:3161)
expression ((execjs):3624:3384)
simple_statement ((execjs):3623:25942)
(execjs):3623:23747
(execjs):3623:22954
block_ ((execjs):3623:28083)
ctor.body ((execjs):3623:27686)
function_ ((execjs):3623:27782)
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:in `eval'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:46:in `call'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/uglifier-3.0.4/lib/uglifier.rb:184:in `run_uglifyjs'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/uglifier-3.0.4/lib/uglifier.rb:146:in `compile'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:53:in `call'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:28:in `call'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/tmp/build_bbc9b84faa191466c24c0c1ff97e1729/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => assets:precompile
- Lingua principale
- Ruby
- Stelle
- 581
- Fork
- 285
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rails/execjs
-
Runtime stderr is missing from ruby error messageForse già presa @arpitjain099 l’ha presa 168 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Tutte le issue di rails/execjs
Issue simili
-
Bug Ruby Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-ruby#3228 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
開発用DockerイメージにPlaywrightのシステム依存を追加するForse già presa @momocus l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
sakazuki-org/sakazuki#1453 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
jenkins-infra/jenkins.io#9615 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno