【问题标题】:clojurescript error on including google dependency包含 google 依赖项的 clojurescript 错误
【发布时间】:2012-06-29 07:34:31
【问题描述】:

我有一个需要 google 闭包依赖项的 cljs 页面 -

(ns pm.client.models
  (:require  [google.pubsub.PubSub :as pubsub]))

这是我在加载 html 页面时看到的错误。错误记录在浏览器的 js 控制台中 -

goog.require could not find: goog.storage.mechanism.HTML5LocalStorage
goog.requireclient.js:96
(anonymous function)client.js:20191
client.js:98Uncaught Error: goog.require could not find: goog.storage.mechanism.HTML5LocalStorage
goog.requireclient.js:98
(anonymous function)

我没有看到使用 cljs-build 编译 clojurescript 的任何错误。

【问题讨论】:

  • cljs-build 是否配置了 :optimizations :advanced?

标签: clojure clojurescript


【解决方案1】:

您似乎没有包含 HTML5LocalStorage 库的 Google Closure jar。

这可能是由于第三方 jar 路径的某些问题(不太可能,因为它是您的项目需要它)或因为路径(或名称)在版本中已更改。确保您没有引用来自开发版本的路径,而是实际使用最终版本。 解压 jar 并使用 grep 来查看 HTML5LocalStorage 是否/在哪里。

【讨论】:

    猜你喜欢
    • 2014-11-10
    • 2019-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多