This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-07
Channels
- # announcements (1)
- # babashka (28)
- # beginners (212)
- # calva (13)
- # clara (3)
- # clj-kondo (39)
- # cljsrn (1)
- # clojure (16)
- # clojure-australia (1)
- # clojure-europe (11)
- # clojure-nl (2)
- # clojure-spec (9)
- # clojure-uk (8)
- # clojurescript (66)
- # cloverage (3)
- # code-reviews (16)
- # cursive (12)
- # data-science (2)
- # datomic (118)
- # events (1)
- # garden (2)
- # improve-getting-started (1)
- # introduce-yourself (1)
- # jobs (4)
- # missionary (5)
- # numerical-computing (1)
- # off-topic (5)
- # pathom (3)
- # polylith (71)
- # re-frame (99)
- # reagent (17)
- # remote-jobs (5)
- # shadow-cljs (35)
- # tools-deps (5)
- # xtdb (4)
getting ns errors
----- Error --------------------------------------------------------------------
Type: java.lang.Exception
Message: Could not find namespace: <....>
Location: <expr>:1:10
Yes, our CI pipeline, which runs in a docker image, uses bb tasks
What is the command you're trying to run?
this dockerfile built and run however fails
FROM babashka/babashka:latest
WORKDIR app
COPY . app
CMD bb -m my.ns
I built this Dockerfile and got two levels of app
, so I believe that workdir basically changed the directory to app, and then the copy command did the copy into an app
subfolder, so I'd say be sure the directory structure in the container is as you expect - for example, changing the copy command to copy . .
made this example work in my context
Thanks for the info and sorry for the late reply. Bob’s right: the COPY line is the problem, fix that and you’re golden
Message: Could not find namespace: medley.core.
Location: /app/src/zoomership.clj:2:5
----- Context ------------------------------------------------------------------
1: (ns zoomership
2: (:require
^--- Could not find namespace: medley.core.
deps
{:paths ["." "src"]
:min-bb-version "0.6.0"
:deps {lambdaisland/uri {:mvn/version "1.4.74"}
medley/medley {:mvn/version "1.3.0"}}}
is this a bb.edn
file? I think you will have most luck to provide a complete repro repository which people can run
you can avoid this by building an uberjar outside of the docker image, or downloading your deps to a separate .m2 folder and copying that into the docker container
ok, workaround here: https://github.com/den1k/bb-docker-deps-bug/pull/1
@U097654L8 I think the above approach can also work for clojure deps: just build an uberjar and then set the classpath for Clojure to that uberjar using -Scp