bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

ReferenceError: localStorage is not defined #662

Closed kommen closed 6 years ago

kommen commented 6 years ago

When upgrading to 0.5.15 I get this error when starting nodejs app with the figwheel client:

Node.js Error...

/Users/kommen/work/nextjournal.com/journal/renderer/compiled/out/renderer/figwheel/client/utils.js:219
if(cljs.core.truth_(figwheel.client.utils.feature_QMARK_.call(null,localStorage,"setItem"))){
                                                                   ^

ReferenceError: localStorage is not defined
    at /Users/kommen/work/nextjournal.com/journal/renderer/compiled/out/renderer/figwheel/client/utils.js:219:68
    at Object.<anonymous> (/Users/kommen/work/nextjournal.com/journal/renderer/compiled/out/renderer/figwheel/client/utils.js:236:3)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
    at Module.require (module.js:606:17)
    at require (internal/module.js:11:18)
    at global.CLOSURE_IMPORT_SCRIPT (/Users/kommen/work/nextjournal.com/journal/renderer/compiled/out/renderer/goog/bootstrap/nodejs.js:80:13)

This seems to be a regression from #639.

kommen commented 6 years ago

Looks like this is fixed in master with https://github.com/bhauman/lein-figwheel/pull/659/commits/96dd11159c11fbe32d625ddaf0af55efacaa5cbc

schnipseljagd commented 6 years ago

Have the same issue with this version

bhauman commented 6 years ago

Just deployed 0.5.16-SNAPSHOT

schnipseljagd commented 6 years ago

For me it's solved with 0.5.16-SNAPSHOT.

kommen commented 6 years ago

this was fixed with the 0.5.16 release