ckirkendall / kioo

Enlive/Enfocus style templating for Facebook's React and Om in ClojureScript.
Eclipse Public License 1.0
404 stars 39 forks source link

Project setup fixes #54

Closed alesya-h closed 9 years ago

alesya-h commented 9 years ago

Currently cloning a repo and runing lein auto-test leads to weird errors:

Compiling ClojureScript.
Compiling "target/test/kioo.js" from ["src" "test" "target/classes" "target/test-classes"]...
Jun 05, 2015 4:27:29 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: file:/home/me/.m2/repository/cljsjs/react/0.13.1-0/react-0.13.1-0.jar!/cljsjs/common/react.ext.js:11: ERROR - constant React assigned a value more than once.
Original definition at file:/home/me/.m2/repository/com/facebook/react/0.11.1/react-0.11.1.jar!/react/externs/react.js:12
var React = {};
^

Jun 05, 2015 4:27:29 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 1 error(s), 0 warning(s)
ERROR: JSC_CONSTANT_REASSIGNED_VALUE_ERROR. constant React assigned a value more than once.
Original definition at file:/home/me/.m2/repository/com/facebook/react/0.11.1/react-0.11.1.jar!/react/externs/react.js:12 at file:/home/me/.m2/repository/cljsjs/react/0.13.1-0/react-0.13.1-0.jar!/cljsjs/common/react.ext.js line 11 : 0
SyntaxError: Expected an identifier but found 'compiled' instead

  phantomjs://webpage.evaluate():1 in evaluateJavaScript

ERROR: cemerick.cljs.test was not required.

You can resolve this issue by ensuring [cemerick.cljs.test] appears
in the :require clause of your test suite namespaces.
Also make sure that your build has actually included any test files.

  /tmp/runner1179346817260289822.js:36 in onError

It turned out that this errors were due different versions of react being imported simultaneously (one from project.clj and other from om/reagent dependencies). After dropping react from project.clj it works fine.

ckirkendall commented 9 years ago

This needs to be handled but adding an exclusion to the reagent line not removing react from the project dependencies.

alesya-h commented 9 years ago

Updated pull-request. React dependencies are now just excluded from reagent and om, and com.facebook/react is dropped as it is deprecated and cljsjs/react should be used instead (see https://github.com/swannodette/react-cljs).