day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
797 stars 146 forks source link

No rendering - react issue following upgrade #213

Closed alex314159 closed 4 years ago

alex314159 commented 4 years ago

Hi,

thanks for the great work with this project - saves so much time to quickly deploy enterprise apps!

I've had to reinstall everything on a new computer and while my projects compile, nothing renders. I get this in the console:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of re_com.box.v_box. in re_com.box.v_box (created by re_com.box.box) in div (created by re_com.box.box) in re_com.box.box (created by jasminegui.riskviews.summary_display) in jasminegui.riskviews.summary_display (created by jasminegui.home.active_home) in jasminegui.home.active_home (created by re_com.box.h_box) in div (created by re_com.box.h_box) in re_com.box.h_box (created by jasminegui.home.home_view) in jasminegui.home.home_view (created by jasminegui.views.active_view) in jasminegui.views.active_view (created by re_com.box.v_box) in div (created by re_com.box.v_box) in re_com.box.v_box (created by jasminegui.views.main_panel) in jasminegui.views.main_panel hasSymbol @ :8281/js/compiled/cljs-runtime/module$node_modules$react$cjs$react_development.js:36 :8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:528 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of re_com.box.v_box. at createFiberFromTypeAndProps (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:528) at createFiberFromElement (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:529) at createChild (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:195) at reconcileChildrenArray (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:203) at eval (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:218) at reconcileChildren (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:268) at beginWork (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:339) at HTMLUnknownElement.callCallback (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:553) at Object.invokeGuardedCallbackImpl (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:555) at invokeGuardedCallback (:8281/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:3)

My project.clj:

:dependencies [ [org.clojure/clojure "1.10.1"] [org.clojure/clojurescript "1.10.758" :exclusions [com.google.javascript/closure-compiler-unshaded org.clojure/google-closure-library]]

[thheller/shadow-cljs "2.9.3"] [reagent "1.0.0-alpha2"] [re-frame "0.12.0"] [re-com "2.8.0"] [cljs-http "0.1.46"] ;[metasoarous/oz "1.6.0-alpha6"] [nrepl "0.7.0"]]

and the output of npm list --depth=0

+-- create-react-class@15.6.3 +-- d3@5.16.0 +-- react@16.13.0 +-- react-dom@16.13.0 +-- react-table@7.0.6 +-- react-table-v6@6.8.6 +-- shadow-cljs@2.9.3 +-- vega@5.11.1 +-- vega-embed@6.8.0 +-- vega-lite@4.12.0 -- webpack@4.43.0

Thank you for the help!!

superstructor commented 4 years ago

I havn't tested anything with reagent 1.x yet (including re-frame itself). Does it work with reagent 0.10.0 ? @alex314159

alex314159 commented 4 years ago

thanks - not working, I've tried downgrading everything as well to [reagent "0.8.1"] [re-frame "0.10.9"] [re-com "2.6.0"]

which is my existing version, and react and react-dom 16.8.6. I suspect there's smthg fundamentally wrong with my react / reagent installation more than re-com itself.

alex314159 commented 4 years ago

just copied my whole node_modules folder from old machine which made it work - thanks