Fork me on GitHub
#shadow-cljs
<
2017-11-02
>
eveko08:11:29

Great, will let you know if I find anything

mhuebert10:11:28

any idea how one can resolve an issue like this:

[:browser] Build failure:
symbol module$node_modules$object_assign$index already provided by [:shadow.build.npm/resource "node_modules/object-assign/index.js"], conflict with [:shadow.build.npm/resource "node_modules/object.assign/index.js"]
{:provide module$node_modules$object_assign$index, :conflict [:shadow.build.npm/resource "node_modules/object-assign/index.js"], :resource-id [:shadow.build.npm/resource "node_modules/object.assign/index.js"]}
ExceptionInfo: symbol module$node_modules$object_assign$index already provided by [:shadow.build.npm/resource "node_modules/object-assign/index.js"], conflict with [:shadow.build.npm/resource "node_modules/object.assign/index.js"]
	clojure.core/ex-info (core.clj:4739)
	clojure.core/ex-info (core.clj:4739)
	shadow.build.data/add-provide (data.clj:74)
	shadow.build.data/add-provide (data.clj:69)
	shadow.build.data/add-provides/fn--19031 (data.clj:87)

mhuebert10:11:28

the module auth0 depends on object.assign (and I use that in my web build), while postcss-loader uses object-assign (not used in web build)

thheller10:11:23

I can probably change the alias generator to account for that, guess google didn’t anticipate something like this

thheller10:11:04

will take a look later

thheller10:11:22

but if the postcss-loader isn’t used in the build why does it get resolved?

thheller10:11:34

seems like it is used somehow?

mhuebert10:11:03

it’s in package.json as it is used for a build script,

mhuebert10:11:17

but it shouldn’t have anything to do with the shadow build

thheller10:11:29

doesn’t matter if its in package.json

thheller10:11:58

it only matters if the dependency gets added to the build via some :require

mhuebert10:11:17

ok. i removed postcss entirely, lets see..

thheller10:11:03

super weird that there are actually object-assign and object.assign packages

mhuebert10:11:24

maybe i am just not using auth0 properly

mhuebert10:11:52

yeah i am using the node version

mhuebert10:11:35

so it is requiring unfriendly things

thheller10:11:02

if the things are compatible

thheller10:11:26

you can just :resolve {"object.assign" {:target :npm :require "object-assign"}} or the other way

thheller10:11:18

I’ll be back later …

mhuebert10:11:00

using auth0-js instead of auth0 package solved this thing in particular. but this clash could be a more general thing. I think the resolve option as you specify there might be ‘enough’. at some point down the chain, the dev has to manually resolve conflicts.

thheller17:11:53

good to know. dunno how common this issue might be. the potential for conflict exists and should probably be fixed nonetheless.