簡體   English   中英

包含谷歌依賴的clojurescript錯誤

[英]clojurescript error on including google dependency

我有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時出現任何錯誤。

看起來你沒有帶有HTML5LocalStorage lib的Google Closure jar。

它可能是由第三方jar路徑的某些問題引起的(不太可能是因為它是你的項目需要它),或者因為路徑(或名稱)在發布中已經改變。 確保您沒有引用dev版本的路徑,但實際上使用的是最終版本。 打開jar並解壓縮以查看HTML5LocalStorage是否/在哪里。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM