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

Jekyll configuration to use ES6 #168

Open
vict0rsch opened this issue Aug 2, 2019 · 0 comments
Open

Jekyll configuration to use ES6 #168

vict0rsch opened this issue Aug 2, 2019 · 0 comments

Comments

@vict0rsch
Copy link

vict0rsch commented Aug 2, 2019

I currently have this error because I use ES6:

Configuration file: ./_config.yml
                    Asset caching is disabled by configuration. However, if you're using proxies, a cache might still be created.
                    SyntaxError: Unexpected token: keyword (const)
  Liquid Exception: SyntaxError: Unexpected token: keyword (const) in /_layouts/base.html
rake aborted!
ExecJS::RuntimeError: SyntaxError: Unexpected token: keyword (const)
JS_Parse_Error.get ((execjs):3538:621)
(execjs):4060:48
(execjs):1:40
Object.<anonymous> ((execjs):1:58)
Module._compile (internal/modules/cjs/loader.js:799:30)
Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
Module.load (internal/modules/cjs/loader.js:666:32)
tryModuleLoad (internal/modules/cjs/loader.js:606:12)
Function.Module._load (internal/modules/cjs/loader.js:598:3)
Function.Module.runMain (internal/modules/cjs/loader.js:862:12)
/usr/local/lib/ruby/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
/usr/local/lib/ruby/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:in `eval'
/usr/local/lib/ruby/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:46:in `call'
/usr/local/lib/ruby/gems/2.5.0/gems/uglifier-3.2.0/lib/uglifier.rb:195:in `run_uglifyjs'
/usr/local/lib/ruby/gems/2.5.0/gems/uglifier-3.2.0/lib/uglifier.rb:157:in `compile'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:134:in `block in find'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in `find'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-assets-2.4.0/lib/jekyll/assets/liquid/tag.rb:188:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-assets-2.4.0/lib/jekyll/assets/liquid/tag.rb:188:in `find'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-assets-2.4.0/lib/jekyll/assets/liquid/tag.rb:188:in `_find_asset'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-assets-2.4.0/lib/jekyll/assets/liquid/tag.rb:157:in `find_asset'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-assets-2.4.0/lib/jekyll/assets/liquid/tag.rb:97:in `render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:109:in `render_node'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:88:in `block in render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:75:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:75:in `render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:208:in `block in render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:242:in `with_profiling'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:207:in `render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:220:in `render!'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/tags/include.rb:137:in `block in render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/context.rb:123:in `stack'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/tags/include.rb:134:in `render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:109:in `render_node'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:88:in `block in render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:75:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:75:in `render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:208:in `block in render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:242:in `with_profiling'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:207:in `render'
/usr/local/lib/ruby/gems/2.5.0/gems/liquid-4.0.0/lib/liquid/template.rb:220:in `render!'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/renderer.rb:123:in `render_liquid'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/renderer.rb:188:in `render_layout'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/renderer.rb:155:in `place_in_layouts'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/renderer.rb:85:in `render_document'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/renderer.rb:62:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:462:in `block (2 levels) in render_docs'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:460:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:460:in `block in render_docs'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:459:in `each_value'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:459:in `render_docs'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:190:in `render'
/usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:73:in `process'
/Users/victor/Documents/Github/vict0rsch/vict0rsch.github.io/Rakefile:33:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `block in execute'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `execute'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
/usr/local/Cellar/ruby/2.5.3_1/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:194:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:238:in `block in invoke_prerequisites'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:236:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:236:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/usr/local/Cellar/ruby/2.5.3_1/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:194:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:183:in `invoke'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:160:in `invoke_task'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block in top_level'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:110:in `top_level'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:83:in `block in run'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/usr/local/lib/ruby/gems/2.5.0/bin/rake:23:in `load'
/usr/local/lib/ruby/gems/2.5.0/bin/rake:23:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:74:in `load'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:28:in `run'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:424:in `exec'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:27:in `dispatch'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:18:in `start'
/usr/local/opt/ruby/bin/bundle:30:in `block in <main>'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/usr/local/opt/ruby/bin/bundle:22:in `<main>'
Tasks: TOP => publish => generate

I have investigated and found in #137 (comment) a sample config.

This however does not solve my issue.

Here is a sample of my config:

assets:
  dirname: assets
  baseurl: /assets/
  sources:
    - _assets/javascripts
    - _assets/stylesheets
    - _assets/images
    - _assets/fonts
  js_compressor: uglifier
  css_compressor: sass
  cachebust: none
  cache: false
  gzip: [ text/css, application/javascript ]
  debug: false
  compressors:
    uglifier:
      harmony: true
      compress:
        unused: false

with Uglifier 3.2

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

1 participant