binaryage / cljs-oops

ClojureScript macros for convenient native Javascript object access.
Other
351 stars 13 forks source link

[NodeJS] throws window is not defined #9

Closed akiroz closed 7 years ago

akiroz commented 7 years ago

When used in NodeJS, the library throws window is not defined unless advanced compilation is used.

darwin commented 7 years ago

Ah, I haven't really tested this under NodeJS.

Most likely the problem will be this line: https://github.com/binaryage/cljs-oops/blob/f4b770368c3cca77de1441bda6ab1d0f875ce890/src/lib/oops/codegen.clj#L233

It is a helper code to present problem details via cljs-devtools "envelope".

You can probably work around it by setting :runtime-use-envelope config option to false. https://github.com/binaryage/cljs-oops/blob/f4b770368c3cca77de1441bda6ab1d0f875ce890/src/lib/oops/defaults.clj#L40