This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-07-17
Channels
- # announcements (11)
- # babashka (20)
- # beginners (8)
- # calva (3)
- # cider (18)
- # clerk (39)
- # clojure (104)
- # clojure-dev (6)
- # clojure-europe (26)
- # clojure-madison (1)
- # clojure-nl (2)
- # clojure-norway (5)
- # clojure-uk (12)
- # clojurescript (18)
- # community-development (4)
- # cursive (1)
- # datalevin (12)
- # fulcro (10)
- # humbleui (6)
- # hyperfiddle (28)
- # leiningen (5)
- # missionary (4)
- # nrepl (1)
- # off-topic (7)
- # overtone (8)
- # releases (1)
- # shadow-cljs (11)
- # uncomplicate (1)
- # xtdb (4)
- # yamlscript (1)
Can you please remind me what should be done in the case of duplicate entries reported by build-report
?
To be specific, in my case under node_modules
I have:
• @sentry/core
• @sentry-internal/replay/node_modules/@sentry/core
• @sentry-internal/replay-canvas/node_modules/@sentry/core
• etc.
Tried removing node_modules
and running npm i
again - no luck.
that means npm installs 2 separate versions. most likely because of some version conflict
i.e. you specifying a @sentry/core
versions but the @sentry-internal
things wanting another
you may specifiy :js-options {:allow-nested-packages false}
to only pick top level packages and thus removing the duplicates. but that may lead to errors if they aren't actually compatible
God I hate NPM.
Figured it was because of another package that I actually don't need anymore because of Sentry 7->8 migration path is wonky.
Ran npm uninstall that-package
. It removed almost everything that's actually specified in my package.json
. How the hell.
I have the follow directory structure:
project-dir
- package.json
- node_modules
- app
- package.json
- node_modules
I have a shadow-cljs.edn
build targeting the app
directory. I would like app
to ignore normal Node resolution for dependencies/packages and only look inside of /app/node_modules
(ignoring /node_modules
). I've tried using :js-options {:js-package-dirs ["app/node_modules"]}}
, but in local dev, my build still seems to resolve packages present in the root directory node_modules but missing from the app/node_modules
directory.
Is there a shadow-cljs way to configure this, or should I try setting the NODE_PATH
env variable to restrict Node module resolution to the app
directory?This might work?
:js-options {:js-package-dirs ["./app/node_modules"]}
:js-options {:js-package-dirs ["app/node_modules"]}}
is correct and should work, if placed properly of course. you didn't specify where you set it
you can see an example in a full config here https://github.com/thheller/shadow-cljs/blob/dafc911d3b35068c49cd682215763de2c1a8b8e4/shadow-cljs.edn#L93-L94