Hey there.

I'm trying to use node destribution of reactjs with js module require.

(defproject compile-cljs-node-modules-react "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME";
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [org.clojure/clojurescript "1.10.238"]]
  :plugins [[lein-cljsbuild "1.1.7"]]
  
  :cljsbuild 
  {:builds {:app
              {:source-paths ["src"]
               :compiler
               {:main           "compile-cljs-node-modules-react.core"
                :asset-path    "/js/out"
                :output-to     "target/cljsbuild/public/js/app.js"
                :output-dir    "target/cljsbuild/public/js/out"
                :source-map    true
                :npm-deps      {:react "16.2.0" :react-dom "16.2.0"}
                :install-deps  true
                :optimizations :none
                :pretty-print  true}}}})


SImple cljs file:
(ns compile-cljs-node-modules-react.core
  (:require ["react-dom/server" :as dom-server]
            [react :as react]))
  
(defn render-simple-markup []
  (dom-server/renderToString (react/createElement "div" nil "Hello, 
world!")))

When I run
lein cljsbuild once app

I get the following error:
[eval]:85
            !id.startsWith(goog:);
                           ^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:635:30)
    at evalScript (bootstrap_node.js:462:27)
    at startup (bootstrap_node.js:163:9)
    at bootstrap_node.js:608:3

OS: windows 7
npm version: 5.5.1
node v8.9.3

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to