This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-01
Channels
- # beginners (15)
- # boot (3)
- # cider (10)
- # clara (2)
- # cljs-dev (19)
- # clojure (31)
- # clojure-uk (9)
- # clojurescript (60)
- # core-async (1)
- # datomic (10)
- # docs (4)
- # fulcro (5)
- # hoplon (33)
- # juxt (1)
- # luminus (1)
- # off-topic (3)
- # om (20)
- # parinfer (2)
- # portkey (61)
- # re-frame (6)
- # reagent (39)
- # shadow-cljs (18)
- # spacemacs (4)
- # specter (8)
Hey guys. I deployed my Reagent app to Heroku. I'm getting a 500 error that says "No implementation of method: :to-uri of protocol: #'hiccup.util/ToURI found for class: nil". What's this error supposed to mean?
I'm not sure... can you provide some more context? a code snippet?
the method is to-uri
not :to-uri
... or perhaps you're expecting a map and getting a nil
I'll send a picture in a bit, but it works fine in development. It seems to be complaining now that it's in production
hmmm, so something has gone wrong when calling include-css? are you missing a css file on the server?
(I'm stabbing in the dark here...)
Yeah I had that problem earlier and the deployment kept getting rejected. I fixed that problem which made my deployment successful. Now I have this new problem that says there's no implementation of to-uri for the protocol ToURI. I tried fixing it by requiring hiccup.util inside my handler.clj file but that didn't work
to me the error message says that it can't call to-uri on nil, not that hiccup.util is missing
perhaps there's a path that's misconfigured which is causing a file not to be found?
in other words, hiccup.util is trying to make an uri from a value that's in your config (or env vars) but that piece of config has not been set and the value is nil (still stabbing in the dark, can you provide a code snippet?)
(ns lazyfit.middleware (:require [ring.middleware.defaults :refer [site-defaults wrap-defaults]] [hiccup.util :refer :all])) (defn wrap-middleware [handler] (wrap-defaults handler site-defaults))
not sure if that snippet of code is the problem... what about the hiccup data that it's trying to process?
or lazyfit.handler/loading-page?
yep, so line 20 looks suspect
omg yeah I just saw that literally right now. I'm redeploying it now and will see if that works
Holy crap it works! Unbelievable smh. I can't believe it was that simple of an error. Thank you so much @au-phiware
glad I could help, is the app for fun or profit?
The app is for fun. I'm learning Reagent and building a web app to help me in my learning process.
I have a problem with the :foreign-libs
compiler option; I get Error: Can't resolve './util'
when I use :foreign-libs [{:file "node_modules/bootstrap/js/src" :module-type :es6}]
... can anyone explain how es6 modules that import relative file paths work with :foreign-libs
?
I have tried specifying the individual file also, but I get the same error:
:foreign-libs [{:file "node_modules/bootstrap/js/src/util.js"
:provides ["bootstrap.util"]
:module-type :es6}
{:file "node_modules/bootstrap/js/src/alert.js"
:provides ["bootstrap.alert"]
:requires ["bootstrap.util"]
:module-type :es6}]
This is my ns call (ns cljsbuild-bootstrap4.core (:require [bootstrap.alert :as alert]))
...I'm still trying to make this work: https://github.com/au-phiware/cljsbuild-bootstrap4
@anmonteiro, your earlier help was much appreciated and considering that there's an issue using npm-deps with modules that don't actually export anything, I thought I'd try bootstrap's es6 modules (that do export objects)... but either I'm missing something or I've found another issue?
any suggestions for a good library/pattern to control per-user long running operations (e.g. I have plenty of relatively per-user heavy file operations that cannot run in parallel, shouldn't be re-tried)?
I’m running a small twitter poll, please vote/share https://twitter.com/thheller/status/914427680690405378
Is it possible to gain access to the keyboard, mouse and screen remotely purely through a browser?
There is this but it seems to be tied to Electron. http://robotjs.io/docs/examples
Anyone know how to tell cljs.repl.node
where to find node
?
@mattbishop Usually if a binary named node
it is on your path it works. But if you have a special path or binary name, I’d try :node-command
. See https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/repl/node.clj#L101
Yeah it's on my path but trying to get Cursive/piggieback to see it there isn't happening for me.
(cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env))
java.io.IOException: Cannot run program "node"
I'll try :node-command
thanks!
@mattbishop Just be aware that the options are passed in the style of named parameters, so something like this should do it
(cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env) :node-command "/usr/local/bin/node")
Tried, failed: (cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env :node-command "/usr/local/bin/node"))
Same error can't find node.
FWIW this works fine in CLI from lein repl
right
let me try that
(cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env) :node-command "/usr/local/bin/node")
ClojureScript Node.js REPL server listening on 57640
To quit, type: :cljs/quit
=> nil
Thanks @mfikes!
Have a 🥐
^ what is this sorcery? 🙂
@anmonteiro I’m curious how Lumo is related here - is that because you can just run Node.js projects on Glitch?
I think so
@dnolen seems like because Lumo is on NPM you can add it as a dependency
and then run the Lumo binary through Node
I’m a little bit mindblown to be honest
so they’re using the Lumo build API to compile that ClojureScript
what would you guys recommend to use as a build pipeline for this for code reload etc?