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

JavaScript comments break build #58

Open
xplosionmind opened this issue Dec 17, 2021 · 2 comments
Open

JavaScript comments break build #58

xplosionmind opened this issue Dec 17, 2021 · 2 comments

Comments

@xplosionmind
Copy link

This is the error I get in the log:

/opt/build/cache/bundle/ruby/3.0.0/gems/uglifier-4.2.0/lib/uglifier.rb:291:in `parse_result': Unexpected token: keyword (default). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true). (Uglifier::Error)
--
\e[36m  1\e[0m // don't need frontmatter because liquid is handled internally...somehow...
\e[36m  2\e[0m 
\e[91m => \e[0mexport \e[91mdefault class JekyllGraph {\e[0m
\e[36m  4\e[0m 
\e[36m  5\e[0m   constructor() {
\e[36m  6\e[0m     this.graphDiv = document.getElementById('jekyll-graph');
\e[36m  7\e[0m   }
\e[36m  8\e[0m 
\e[36m  9\e[0m   // d3
\e[36m 10\e[0m   drawNetWeb () {
\e[36m 11\e[0m     let assetsPath = '' !== '' ? '' : '/assets';
==
	from /opt/build/cache/bundle/ruby/3.0.0/gems/uglifier-4.2.0/lib/uglifier.rb:221:in `run_uglifyjs'
	from /opt/build/cache/bundle/ruby/3.0.0/gems/uglifier-4.2.0/lib/uglifier.rb:166:in `compile'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-minifier-be6d0d56b1fc/lib/jekyll-minifier.rb:102:in `output_js'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-minifier-be6d0d56b1fc/lib/jekyll-minifier.rb:21:in `output_compressed'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-minifier-be6d0d56b1fc/lib/jekyll-minifier.rb:182:in `write'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/site.rb:231:in `block in write'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/site.rb:358:in `block (2 levels) in each_site_file'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/site.rb:357:in `each'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/site.rb:357:in `block in each_site_file'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/site.rb:356:in `each'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/site.rb:356:in `each_site_file'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/site.rb:230:in `write'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/profiler.rb:43:in `block in profile_process'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/profiler.rb:41:in `each'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/profiler.rb:41:in `profile_process'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/site.rb:75:in `process'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/command.rb:28:in `process_site'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/commands/build.rb:65:in `build'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/commands/build.rb:36:in `process'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/command.rb:91:in `each'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	from /opt/build/cache/bundle/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /opt/build/cache/bundle/ruby/3.0.0/bundler/gems/jekyll-30f795f5a7e0/exe/jekyll:15:in `<top (required)>'
	from /opt/build/cache/binstubs/jekyll:29:in `load'
	from /opt/build/cache/binstubs/jekyll:29:in `<main>'
@manunamz
Copy link

Related?

@xplosionmind
Copy link
Author

xplosionmind commented Jan 19, 2022

My current workaround is adding to _config.yml:

jekyll-minifier:
  exclude: '/feeds/*'
  compress_css: false
  compress_javascript: false
  compress_json: false

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

2 participants