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

ReferenceError with latest Jekyll (2.5.3) #1

Closed
euler0 opened this issue Mar 27, 2015 · 5 comments
Closed

ReferenceError with latest Jekyll (2.5.3) #1

euler0 opened this issue Mar 27, 2015 · 5 comments

Comments

@euler0
Copy link

euler0 commented Mar 27, 2015

With Jekyll 2.5.3, I couldn't build the test site.

      Generating... 
  Liquid Exception: ReferenceError: Can't find variable: global in index.html
jekyll 2.5.3 | Error:  ReferenceError: Can't find variable: global
@drewsberry
Copy link
Collaborator

Would you mind running jekyll build --trace? I just updated to 2.5.3 and I'm getting a different, seemingly unrelated error.

@drewsberry
Copy link
Collaborator

I think this has to do withthe ExecJS runtime... Which are you using? (If you're not sure, just copy the output of

ruby -e "require 'execjs'; puts ExecJS.runtime.name"

The reason I say this is that your error indicates that the JS runtime can't find global, whereas the error I'm getting is complaining because it can't find assign global.katex because again it can't find global. I think the problem may be with the first line of katex.js, where it says

... "undefined" != typeof window ? window.katex = e() : global.katex = e() ...

@drewsberry
Copy link
Collaborator

After further investigation, it seems this is caused by updating Jekyll to 2.5.3 causing ExecJS to update to 2.4.0. This works perfectly with ExecJS == 2.2.2, as before, but 2.3.0 and 2.4.0 both cause problems of the sort you encountered.

I'm not sure whether this is a change in the way ExecJS works or is a bug, but I'll raise an issue upstream. In the meantime I'll specify the version in the Gemfile.

Thanks very much for bringing this to my attention.

@drewsberry
Copy link
Collaborator

Upstream issue: rails/execjs#14

@euler0
Copy link
Author

euler0 commented Apr 1, 2015

@drewsberry Thank you for your investigation!

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