Problem compiling KaTeX
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, node.js, ruby
- 領域
- tooling
研究方向
Reproduce the failure with Node.js v0.12.1 using the execjs-katex.rb example and compare ExecJS 2.2.2 with 2.4.0. Start with lib/execjs/external_runtime.rb, lib/execjs/runtime.rb, and lib/execjs/module.rb; done means compiling the cited katex.min.js succeeds under the newer version without the undefined global error.
由索引模型根據 Issue 內容生成。
描述
I've been using ExecJS for compiling KaTeX for a while now (see repo https://github.com/drewsberry/jekyll-katex-block).
After upgrading from 2.2.2 (where it worked perfectly), versions 2.3.0 and 2.4.0 cannot compile katex.js, giving the error TypeError: Cannot set property 'katex' of undefined (ExecJS::ProgramError). I downloaded katex.min.js version 0.2.0 from https://github.com/Khan/KaTeX/releases. ExecJS version 2.2.2 compiles the same file without problem.
The full trace is below:
p ((execjs):1:563): TypeError: Cannot set property 'katex' of undefined (ExecJS::ProgramError)
from (execjs):1:568
from (execjs):11:14
from (execjs):1:102
from Object.<anonymous> ((execjs):1:120)
from Module._compile (module.js:460:26)
from Object.Module._extensions..js (module.js:478:10)
from Module.load (module.js:355:32)
from Function.Module._load (module.js:310:12)
from Function.Module.runMain (module.js:501:10)
from /var/lib/gems/2.1.0/gems/execjs-2.4.0/lib/execjs/external_runtime.rb:32:in `exec'
from /var/lib/gems/2.1.0/gems/execjs-2.4.0/lib/execjs/external_runtime.rb:14:in `initialize'
from /var/lib/gems/2.1.0/gems/execjs-2.4.0/lib/execjs/runtime.rb:44:in `new'
from /var/lib/gems/2.1.0/gems/execjs-2.4.0/lib/execjs/runtime.rb:44:in `compile'
from /var/lib/gems/2.1.0/gems/execjs-2.4.0/lib/execjs/module.rb:27:in `compile'
from execjs-katex.rb:4:in `<main>'
It seems like it might have to do with the following line in katex.min.js:
... "undefined" != typeof window ? window.katex = e() : global.katex = e() ...
In 2.2.2, running ExecJS.eval "typeof global" returns Object, whereas in 2.4.0 it returns undefined.
I'm using Node.js v0.12.1 for the runtime.
- 主要語言
- Ruby
- 星號
- 581
- 分支
- 285
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rails/execjs 的其他 Issue
-
Runtime stderr is missing from ruby error message可能已有人在做 @arpitjain099 於 168 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 45/100
-
難度 3/5 1-2 天 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 25/100
-
難度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
Bug Ruby Waiting for: Product Owner
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-ruby#3228 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
開発用DockerイメージにPlaywrightのシステム依存を追加する可能已有人在做 @momocus 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 85/100
sakazuki-org/sakazuki#1453 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 76/100
jenkins-infra/jenkins.io#9615 · 1 則留言 ·
維護者通常 1 天內回覆