Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.3.0-RC1] coursier fails when with "Conflicting dependencies" #4720

Closed
1 task done
Katrix opened this issue May 23, 2019 · 6 comments · Fixed by #4950
Closed
1 task done

[1.3.0-RC1] coursier fails when with "Conflicting dependencies" #4720

Katrix opened this issue May 23, 2019 · 6 comments · Fixed by #4950
Labels
Milestone

Comments

@Katrix
Copy link

Katrix commented May 23, 2019

steps

Add "com.github.gpgekko" % "sbt-autoprefixer" % "1.2.0" to a project

problem

[error] lmcoursier.internal.shaded.coursier.error.ResolutionError$Several: Error downloading org.webjars.npm:browserslist:[2.5.1,3)
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/org/webjars/npm/browserslist/2.11.3/browserslist-2.11.3.pom
[error]   not found: C:\Users\katri\.ivy2\local\org.webjars.npm\browserslist
[error]   not found: https://repo.triplequote.com/artifactory/sbt-plugins-release/org.webjars.npm/browserslist/
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.webjars.npm/browserslist/
[error]   not found: http://repo.typesafe.com/typesafe/releases/org/webjars/npm/browserslist/maven-metadata.xml
[error] Conflicting dependencies:
[error] org.webjars.npm:is-number:2.1.0:default(compile)
[error] org.webjars.npm:is-number:4.0.0:default(compile)
[error] org.webjars.npm:kind-of:3.2.2:default(compile)
[error] org.webjars.npm:kind-of:6.0.2:default(compile)
[error] org.webjars.npm:string-width:1.0.2:default(compile)
[error] org.webjars.npm:string-width:2.1.1:default(compile)
[error] org.webjars.npm:strip-ansi:3.0.1:default(compile)
[error] org.webjars.npm:strip-ansi:4.0.0:default(compile)
[error]         at lmcoursier.internal.shaded.coursier.error.ResolutionError$.from(ResolutionError.scala:70)
[error]         at lmcoursier.internal.shaded.coursier.Resolve.validate0$1(Resolve.scala:141)
[error]         at lmcoursier.internal.shaded.coursier.Resolve.$anonfun$ioWithConflicts0$4(Resolve.scala:183)
[error]         at lmcoursier.internal.shaded.coursier.util.Task$.$anonfun$flatMap$2(Task.scala:11)
[error]         at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
[error]         at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
[error]         at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] (update) lmcoursier.internal.shaded.coursier.error.ResolutionError$Several: Error downloading org.webjars.npm:browserslist:[2.5.1,3)
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/org/webjars/npm/browserslist/2.11.3/browserslist-2.11.3.pom
[error]   not found: C:\Users\katri\.ivy2\local\org.webjars.npm\browserslist
[error]   not found: https://repo.triplequote.com/artifactory/sbt-plugins-release/org.webjars.npm/browserslist/
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.webjars.npm/browserslist/
[error]   not found: http://repo.typesafe.com/typesafe/releases/org/webjars/npm/browserslist/maven-metadata.xml
[error] Conflicting dependencies:
[error] org.webjars.npm:is-number:2.1.0:default(compile)
[error] org.webjars.npm:is-number:4.0.0:default(compile)
[error] org.webjars.npm:kind-of:3.2.2:default(compile)
[error] org.webjars.npm:kind-of:6.0.2:default(compile)
[error] org.webjars.npm:string-width:1.0.2:default(compile)
[error] org.webjars.npm:string-width:2.1.1:default(compile)
[error] org.webjars.npm:strip-ansi:3.0.1:default(compile)
[error] org.webjars.npm:strip-ansi:4.0.0:default(compile)

expectation

Now, the POM truly is missing for some reason, but it worked just fine with 1.2.8

sbt version: 1.3.0-RC1

@Katrix Katrix changed the title [1.3-RC1] coursier fails when no POM file is found [1.3.0-RC1] coursier fails when no POM file is found May 23, 2019
@eed3si9n
Copy link
Member

@Katrix Thanks for the report!

The error message says:

[error] Conflicting dependencies:
[error] org.webjars.npm:is-number:2.1.0:default(compile)
[error] org.webjars.npm:is-number:4.0.0:default(compile)
[error] org.webjars.npm:kind-of:3.2.2:default(compile)
[error] org.webjars.npm:kind-of:6.0.2:default(compile)
[error] org.webjars.npm:string-width:1.0.2:default(compile)
[error] org.webjars.npm:string-width:2.1.1:default(compile)
[error] org.webjars.npm:strip-ansi:3.0.1:default(compile)
[error] org.webjars.npm:strip-ansi:4.0.0:default(compile)

I suggest you override the version for those conflicting dependencies - https://www.scala-sbt.org/1.x/docs/Library-Management.html#Overriding+a+version
or use Ivy instead.

ThisBuild / useCoursier := false

@eed3si9n eed3si9n added area/library_management library management workaround exists There's a workaround labels May 23, 2019
@eed3si9n eed3si9n changed the title [1.3.0-RC1] coursier fails when no POM file is found [1.3.0-RC1] coursier fails when with "Conflicting dependencies" May 23, 2019
@joan38
Copy link

joan38 commented Jul 17, 2019

I'm hitting this as well in SBT 1.3.0-RC3 and dependencyOverrides don't seem to resolve the issue.

@joan38
Copy link

joan38 commented Jul 18, 2019

I tried something like:

dependencyOverrides += "org.webjars.npm" %% "kind-of" % "6.0.0"

But it doesn't work any idea?

@eed3si9n
Copy link
Member

That sounds concerning.

@alexarchambault dependencyOverrides should be able to resolve any conflicts, right?

@joan38
Copy link

joan38 commented Jul 18, 2019

@alexarchambault @eed3si9n Reproduction steps:

touch build.sbt
mkdir project
cat > project/plugins.sbt << EOF
addSbtPlugin("com.github.gpgekko" % "sbt-autoprefixer" % "1.2.0")
dependencyOverrides ++= Seq(
  "org.webjars.npm" % "is-number" % "4.0.0",
  "org.webjars.npm" % "kind-of" % "6.0.0",
  "org.webjars.npm" % "string-width" % "2.0.0",
  "org.webjars.npm" % "strip-ansi" % "4.0.0"
)
EOF
echo "sbt.version=1.3.0-RC3" > project/build.properties
sbt update

@alexarchambault
Copy link
Contributor

Seems to be an issue with the wiring of sbt with coursier. It's an issue with the sbt-lm-coursier plugin too, that's very similar to the coursier integration in sbt.

@eed3si9n eed3si9n added this to the 1.3.0 milestone Jul 19, 2019
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Aug 3, 2019
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Aug 15, 2019
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Aug 15, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants