{"action":"created","issue":{"url":"https://api.github.com/repos/ScalaConsultants/replumb/issues/56","labels_url":"https://api.github.com/repos/ScalaConsultants/replumb/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/ScalaConsultants/replumb/issues/56/comments","events_url":"https://api.github.com/repos/ScalaConsultants/replumb/issues/56/events","html_url":"https://github.com/ScalaConsultants/replumb/issues/56","id":120868889,"number":56,"title":"Require in node throws \"Namespace already declared\"","user":{"login":"arichiardi","id":1724788,"avatar_url":"https://avatars.githubusercontent.com/u/1724788?v=3","gravatar_id":"","url":"https://api.github.com/users/arichiardi","html_url":"https://github.com/arichiardi","followers_url":"https://api.github.com/users/arichiardi/followers","following_url":"https://api.github.com/users/arichiardi/following{/other_user}","gists_url":"https://api.github.com/users/arichiardi/gists{/gist_id}","starred_url":"https://api.github.com/users/arichiardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arichiardi/subscriptions","organizations_url":"https://api.github.com/users/arichiardi/orgs","repos_url":"https://api.github.com/users/arichiardi/repos","events_url":"https://api.github.com/users/arichiardi/events{/privacy}","received_events_url":"https://api.github.com/users/arichiardi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-07T21:12:20Z","updated_at":"2015-12-07T22:01:45Z","closed_at":null,"body":"There is a problem with `require` difficult for me to figure out at the moment.\r\n\r\n```\r\nlein node-repl*\r\nnode dev-resources/private/node/compiled/nodejs-repl.js dev-resources/private/test/src/cljs <- (quite verbose I know to start a repl)\r\n```\r\n\r\nThen (:verbose is true) :\r\n```\r\ncljs.user=> (require 'foo.bar.baz)\r\nInitializing REPL environment with data {:form (require 'foo.bar.baz), :ns cljs.user, :target :nodejs}\r\n\r\nEvaluating  (require (quote foo.bar.baz))  with options  {:target :nodejs, :src-paths [dev-resources/private/test/src/cljs], :verbose true}\r\nProcessing :require via (ns cljs.user (:require [foo.bar.baz]))\r\nNamespace side effects for cljs.user\r\nLoading dependencies for cljs.user\r\nLoading foo.bar.baz namespace\r\nReading dev-resources/private/test/src/cljs/foo/bar/baz.cljs ...\r\nEvaluating foo.bar.baz\r\nNamespace side effects for foo.bar.baz\r\nProcessing :use-macros for foo.bar.baz\r\nProcessing :require-macros for foo.bar.baz\r\ngoog.provide(\"foo.bar.baz\");\r\n(function (){\r\nfoo.bar.baz.a = \"whatever\"; return (\r\nnew cljs.core.Var(function(){return foo.bar.baz.a;},new cljs.core.Symbol(\"foo.bar.baz\",\"a\",\"foo.bar.baz/a\",-992699891,null),cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,\"ns\",\"ns\",441598760),new cljs.core.Keyword(null,\"name\",\"name\",1843675177),new cljs.core.Keyword(null,\"file\",\"file\",-1269645878),new cljs.core.Keyword(null,\"end-column\",\"end-column\",1425389514),new cljs.core.Keyword(null,\"column\",\"column\",2078222095),new cljs.core.Keyword(null,\"line\",\"line\",212345235),new cljs.core.Keyword(null,\"end-line\",\"end-line\",1837326455),new cljs.core.Keyword(null,\"arglists\",\"arglists\",1661989754),new cljs.core.Keyword(null,\"doc\",\"doc\",1913296891),new cljs.core.Keyword(null,\"test\",\"test\",577538877)],[new cljs.core.Symbol(null,\"foo.bar.baz\",\"foo.bar.baz\",128757726,null),new cljs.core.Symbol(null,\"a\",\"a\",-482876059,null),null,7,1,3,3,cljs.core.List.EMPTY,null,(cljs.core.truth_(foo.bar.baz.a)?foo.bar.baz.a.cljs$lang$test:null)])));})()\r\n;\r\n\r\nLoading dependencies for cljs.user\r\nProcessing :use-macros for cljs.user\r\nProcessing :require-macros for cljs.user\r\n\r\n/home/kapitan/git/replumb/dev-resources/private/node/compiled/out/goog/base.js:273\r\n      throw Error('Namespace \"' + name + '\" already declared.');\r\n            ^\r\nError: Namespace \"cljs.user\" already declared.\r\n    at Error (native)\r\n    at Object.goog.provide (/home/kapitan/git/replumb/dev-resources/private/node/compiled/out/goog/base.js:273:13)\r\n    at eval (eval at cljs$js$js_eval (/home/kapitan/git/replumb/dev-resources/private/node/compiled/out/cljs/js.cljs:98:12), <anonymous>:1:6)\r\n    at cljs$js$js_eval (/home/kapitan/git/replumb/dev-resources/private/node/compiled/out/cljs/js.cljs:98:4)\r\n    at /home/kapitan/git/replumb/dev-resources/private/node/compiled/out/cljs/js.cljs:555:28\r\n    at /home/kapitan/git/replumb/dev-resources/private/node/compiled/out/cljs/js.cljs:418:47\r\n    at cljs$js$load_macros (/home/kapitan/git/replumb/dev-resources/private/node/compiled/out/cljs/js.cljs:369:6)\r\n    at /home/kapitan/git/replumb/dev-resources/private/node/compiled/out/cljs/js.cljs:403:37\r\n    at cljs$js$load_macros (/home/kapitan/git/replumb/dev-resources/private/node/compiled/out/cljs/js.cljs:369:6)\r\n    at cljs$js$check_uses_and_load_macros (/home/kapitan/git/replumb/dev-resources/private/node/compiled/out/cljs/js.cljs:397:29)\r\n```\r\nIn the tests I have solved by setting `js/COMPILED` to true, but is it the right way to go?\r\n"},"comment":{"url":"https://api.github.com/repos/ScalaConsultants/replumb/issues/comments/162679548","html_url":"https://github.com/ScalaConsultants/replumb/issues/56#issuecomment-162679548","issue_url":"https://api.github.com/repos/ScalaConsultants/replumb/issues/56","id":162679548,"user":{"login":"mfikes","id":1723464,"avatar_url":"https://avatars.githubusercontent.com/u/1723464?v=3","gravatar_id":"","url":"https://api.github.com/users/mfikes","html_url":"https://github.com/mfikes","followers_url":"https://api.github.com/users/mfikes/followers","following_url":"https://api.github.com/users/mfikes/following{/other_user}","gists_url":"https://api.github.com/users/mfikes/gists{/gist_id}","starred_url":"https://api.github.com/users/mfikes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfikes/subscriptions","organizations_url":"https://api.github.com/users/mfikes/orgs","repos_url":"https://api.github.com/users/mfikes/repos","events_url":"https://api.github.com/users/mfikes/events{/privacy}","received_events_url":"https://api.github.com/users/mfikes/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T22:01:45Z","updated_at":"2015-12-07T22:01:45Z","body":"See https://github.com/clojure/clojurescript/wiki/Custom-REPLs#eliminating-loaded-libs-tracking"}}