This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-10
Channels
- # aleph (4)
- # aws (2)
- # bangalore-clj (2)
- # beginners (84)
- # boot (25)
- # cider (3)
- # cljsrn (3)
- # clojure (57)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-russia (7)
- # clojure-spec (18)
- # clojure-uk (29)
- # clojurescript (90)
- # cursive (11)
- # data-science (68)
- # datascript (2)
- # datomic (25)
- # duct (3)
- # fulcro (13)
- # graphql (7)
- # immutant (1)
- # jobs (1)
- # leiningen (12)
- # lumo (1)
- # off-topic (51)
- # om (43)
- # onyx (15)
- # parinfer (10)
- # pedestal (4)
- # re-frame (7)
- # reagent (42)
- # ring-swagger (42)
- # rum (1)
- # shadow-cljs (172)
- # spacemacs (10)
- # specter (4)
- # sql (4)
- # test-check (19)
- # unrepl (54)
- # yada (3)
Oh nice good idea
@mitchelkuijpers did you do any other tweaks to get the nREPL working or was including the middleware enough?
Including the middleware was enough
Yes ofcourse
Will have to extract it will do it this weekend
Will make one with a automatic emacs configuration so you can also run it in emacs 😛
You have project specific config if you use projectile (which spacemacs does)
https://code.thheller.com/blog/shadow-cljs/2017/11/10/js-dependencies-in-practice.html
Hi, @thheller ! Do we have a method to hot-reload
over https
in shadow-cljs watch app
now?
the problem is that the default java keytool
for working with certificates doesn’t like things openssl
generates
for example this method of generating self-signed certs https://certsimple.com/blog/localhost-ssl-fix
I only used them. The only thing I know is there is a privateKey
file and a certificate
file.
-----BEGIN CERTIFICATE-----
MIIDMTCCAhmgAwIBAgIBATANBgkqhkiG9w0BAQsFADBGMRYwFAYDVQQDDA1UaG9t
YXMgSGVsbGVyMQswCQYDVQQGEwJERTEfMB0GCSqGSIb3DQEJARYQaW5mb0B6aWxl
bmNlLm5ldDAeFw0xNzEwMjMwNzU2MDVaFw0xODEwMjMwNzU2MDVaMEYxFjAUBgNV
BAMMDVRob21hcyBIZWxsZXIxCzAJBgNVBAYTAkRFMR8wHQYJKoZIhvcNAQkBFhBp
bmZvQHppbGVuY2UubmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
xV7BEpu7npqMSUNPyWLr3dox8byM14f7HJuSCeqeln/lL/Yr/OwnD2fuurI9/k0H
xk9QJq2x76AsxHQOx5Bv036gLc+rUuBVAJkamRvYBwrCW2T5Z0ct1goVY5xy0iiP
bj6Dv/Wgpr9iM5rIVdf1zpp1U/IdcbQ7nJTGvScuroIQir73LKm5GuEKzz9dBWdw
C0wEjzuorHLjCTIF/ie9Qgjue1LX5mv+gjmQVfsDvaKPsddu5+It+VAvdvKmYbhN
NjAP1z+84VWF20phyfuqdvEgV2P8S73GL36EdiXP/raQg0zSBvsznN9EjbOB3nmQ
G1ljJvQBMIxAnIQx5XuKVQIDAQABoyowKDAOBgNVHQ8BAf8EBAMCB4AwFgYDVR0l
AQH/BAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggEBADoq8TDWIj/ZfUih
+XO9XfJ2/o3dMiQJEEhkQISEwVc0Bz+Ik2YXyuC7StgBaF1ji0YzhEmFx+7OvT5K
VRtJDf6f4SI9z4R+0ZRPKWR1MNGPGJddDg93IybloJ8zymLiKC3N76QIDeXo73hb
1x1aPFWiGcV3b3sY1zaifGphHdAK4tlyWMY4gUFCqmXH1x0OKPgMfSa6EwZpSw0u
x7Qq5Z5oemL7kNlPKpcC0R08+EaFC2g1ls0q55dvojgxuAC6wD120zrT7QTqkLQ/
gd9MCFduABKgkKv+Lay45jpFeObU5LMe57iNizRCF6E7eDPh7O0EIfJM+IcWtrxc
PDLcVSI=
-----END CERTIFICATE-----
the SAN stuff is important for Chrome. Otherwise I couldn’t get it to trust the cert.
Sorry for bothering. I have the key
and cert
file on my server. Should I download the two files and add the path of them to :ssl
?
you must use keytool
to create the keystore. I have no clue if you can import the certs you already have
that tool is probably more complicated than java itself but it can do pretty much anything related to ssl
Hi, @thheller. It seems there is some (goog-define ssl false)
. How to enable ssl
? I generated a keystore but don't know how to use it, if it can be used. I've already add :ssl {...}
to shadow-cljs.edn
I just upgraded to the newest shadow-cljs and I start getting errors like:
ReferenceError: [BABEL] node_modules/styled-components/dist/styled-components.es.js: Unknown option: /home/mitchel/Development/atlas-crm-next/node_modules/react/react.js.Children. Check out for more information about options.
A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:
Invalid:
`{ presets: [{option: value}] }`
Valid:
`{ presets: [['presetName', {option: value}]] }`
For more detailed information on preset configuration, please see . (While processing preset: "/home/mitchel/Development/atlas-crm-next/node_modules/react/react.js")
at Logger.error (/home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/options/option-manager.js:226:20)
at /home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
at /home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
at Array.map (native)
at OptionManager.resolvePresets (/home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
at OptionManager.mergePresets (/home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
at OptionManager.mergeOptions (/home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
at OptionManager.init (/home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/home/mitchel/Development/atlas-crm-next/node_modules/babel-core/lib/transformation/file/index.js:212:65)
Oh wait is it loading babel config?
@mitchelkuijpers looks like it. did it work before?
shadow-cljs - config: /Users/yuzhao/gits/luminus-projects/shadow-cljs-demo/shadow-cljs.edn version: 2.0.71
Still got this.
browser.cljs:260 Mixed Content: The page at '' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint ''. This request has been blocked; this endpoint must be available over WSS.
shadow$cljs$devtools$client$browser$ws_connect @ browser.cljs:260
(anonymous) @ browser.cljs:303
browser.cljs:260 Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
at Object.shadow$cljs$devtools$client$browser$ws_connect [as ws_connect] ()
at
@thheller It did work before, and I did not see the babel transforms before
shadow-cljs - server running at http://localhost:8021
{:dependencies
[[cljs-ajax "0.7.2"]
[re-frame "0.10.2"]
[day8.re-frame/undo "0.3.2"]
[day8.re-frame/http-fx "0.1.4"]
[cljsjs/react "15.6.2-0"] ;; required by "reagent/impl/util.cljs"
[reagent "0.7.0"]
[reagent-utils "0.2.1"]
[secretary "1.2.3"]
[garden "1.3.3"]
#_[braintripping/re-frame-trace "0.1.9"]
[binaryage/devtools "0.9.7"]
[re-frisk "0.5.0"]]
:ssl {:keystore "my-keystore.jks"
:password "000000"}
:http {:port 8021}...}
@mitchelkuijpers doh. I accidentally enabled the use of package.json
"module"
.
Ah it does look cool but I get some random issues now 😛
[email protected]
. sorry about that.
No problem thnx
@cmal I’m setting up a test project now. only tested it from within shadow-cljs itself so I might have missed something
OK. You can clone https://bitbucket.org/cmal/shadow-cljs-demo and run shadow-cljs watch doumi
I can not remember why I add "/Users/yuzhao/gits/shadow-cljs/src/main"
to the :source-paths
browser.cljs:281 WebSocket connection to '' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
but I don’t know how your entire setup works since you are not using a local server?
only in the wechat devtool
I can get data from the API and see the whole webpage, and it must be in a https://
server.
I am not sure, does the error message browser.cljs:281 WebSocket connection to '
tell me that the ssl-keystore is not valid?
@thheller I am setting up devcards and I got this error:
------ ERROR -------------------------------------------------------------------
File: /home/mitchel/Development/atlas-crm-next/src/cards/atlas_crm/hipchat/ui/configuration_cards.cljs:1:1
--------------------------------------------------------------------------------
1 | (ns atlas-crm.hipchat.ui.configuration-cards
-------^------------------------------------------------------------------------
Invalid :refer, var devcards.core/defcard does not exist
--------------------------------------------------------------------------------
2 | (:require
3 | [fulcro.client.cards :refer [defcard-fulcro]]
4 | [devcards.core :as dc :refer [defcard]]
5 | [atlas-crm.ui.screens.hipchat.configuration :as configuration]
6 | [fulcro.ui.forms :as forms]))
--------------------------------------------------------------------------------
when I changed the :refer
to :refer-macros
it started working. Is the compiler maybe to strict? Because this should work in CLJSOn line 4 btw
hmm devcard.core
has no self-require https://github.com/bhauman/devcards/blob/master/src/devcards/core.cljs so no it should not work
@thheller that is the server. remove :http {:port 8021}
got WebSocket connection to '
Ah true, then it's correct
Nvm then @thheller sorry for wasting your time
@mitchelkuijpers should definitely be done by devcards though. does it really work in figwheel without?
Yeah somehow it works in figwheel
I don't know tbh
@thheller I see. the wss://
server should be in my local machine, not the remote server.
Does anyone know if shadow-cljs appends timestamps to sourcemaps, same as the main cljs compiler does mentioned here https://www.reddit.com/r/Clojure/comments/7bwtzu/anyone_here_using_macchiato_in_production/dplvemz/
@mikeb btw that breaks sourcemaps in firefox if you add timestamps
@cmal you are probably running into https://github.com/thheller/shadow-cljs/issues/91 now. did the websocket ever work?
Anyone here gotten shadow-cljs to work with Node? I'm getting Assert failed: (satisfies? build-log/BuildLog logger)
when I run.
I opened an issue before I thought to come here. 🙂
^^^ My error was caused by an invalid main configuration.
{:id :script
:target :node-script
:main shadowhi.core/main
:output-to "dist/shadowhi.js"}}}
That worked for me.