This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-01
Channels
- # aws (1)
- # beginners (237)
- # boot (2)
- # calva (6)
- # cider (16)
- # clara (10)
- # clj-kondo (1)
- # cljs-dev (24)
- # clojure (29)
- # clojure-brasil (2)
- # clojure-dev (20)
- # clojure-europe (1)
- # clojure-italy (56)
- # clojure-japan (1)
- # clojure-nl (16)
- # clojure-spec (12)
- # clojure-uk (12)
- # clojurescript (24)
- # clojureverse-ops (3)
- # core-async (3)
- # cursive (21)
- # datascript (5)
- # datomic (82)
- # devops (5)
- # duct (14)
- # emacs (2)
- # fulcro (2)
- # jobs (6)
- # juxt (7)
- # kaocha (6)
- # leiningen (19)
- # luminus (3)
- # nrepl (51)
- # off-topic (208)
- # other-languages (1)
- # re-frame (8)
- # reagent (9)
- # remote-jobs (6)
- # shadow-cljs (37)
- # spacemacs (6)
- # testing (12)
- # tools-deps (25)
To put things into context, I accidentally hit the up arrow to try to get the last entered command, out of habit really, and it encountered a compile error of unexpected token... and then it just hangs there. Anything I enter just goes to the next line
Does anyone have an example of successfully using cljsjs.aws-sdk-js
? It doesn't seem like the exports are getting into the global environment as expected:
> (require 'cljsjs.aws-sdk-js)
nil
> js/AWS
Execution error (ReferenceError) at (<cljs repl>:1).
AWS is not defined
js/AWS
should be defined per: https://raw.githubusercontent.com/cljsjs/packages/master/aws-sdk-js/resources/cljsjs/aws-sdk-js/common/aws-sdk-js.ext.jsNot directly answering your question, but I have an example of manually specifying foreign-libs and a custom extern: https://github.com/polymeris/cljs-aws/blob/master/project.clj#L47
TBH, I don't really understand why the cljsjs thing doesn't work. I looked into it a few months ago, but forgot it by now
I was using cljsjs, in fact https://github.com/polymeris/cljs-aws/commit/a2c2e5f5493951c10409999014615e69e322ca48 Then I switched to this method because I only use a single SDK function, and cljsjs was very out-of-date at the time
Hmm, I am seeing the same result with that approach. Maybe the :foreign-libs
stuff in the cljsbuild section is not applied when running a repl?
ah, maybe that's the problem. This is code that gets deployed to a lambda so there is no browser.
(c.f. https://github.com/polymeris/cljs-aws/blob/master/src/cljs_aws/base/config.cljs#L7)
> (js/require "aws-sdk")
Execution error (Error) at (<cljs repl>:1).
Cannot find module 'aws-sdk'
I found a prior example of someone asking about this in this Slack a couple years ago (https://clojurians-log.clojureverse.org/clojurescript/2016-04-27/1461769451.001233) but there did not seem to be a resolution.