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

Dependency doesn't resolve in sbt #25

Open
TobiasRoland opened this issue Jan 9, 2020 · 1 comment
Open

Dependency doesn't resolve in sbt #25

TobiasRoland opened this issue Jan 9, 2020 · 1 comment

Comments

@TobiasRoland
Copy link

TobiasRoland commented Jan 9, 2020

In the readme, we've got:

"io.scalajs.npm" %%% "express" % "0.5.0"

But this dependency will not resolve. Falling back to "io.scalajs.npm" %%% "express" % "0.4.2" in my build.sbt works - 0.5 will produce error akin to the following when compiling:


[warn]
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading io.scalajs.npm:express_sjs0.6_2.12:0.5.0
[error]   Not found
[error]   Not found
[error]   not found: /home/tobiasroland/.ivy2/local/io.scalajs.npm/express_sjs0.6_2.12/0.5.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/io/scalajs/npm/express_sjs0.6_2.12/0.5.0/express_sjs0.6_2.12-0.5.0.pom
[error]         at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:245)
[error]         at lmcoursier.CoursierDependencyResolution.$anonfun$update$34(CoursierDependencyResolution.scala:214)
[error]         at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]         at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:214)
[error]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:52)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:102)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:69)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)
[error]         at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)
[error]         at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2947)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error]         at sbt.Execute.work(Execute.scala:290)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:834)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading io.scalajs.npm:express_sjs0.6_2.12:0.5.0
[error]   Not found
[error]   Not found
[error]   not found: /home/tobiasroland/.ivy2/local/io.scalajs.npm/express_sjs0.6_2.12/0.5.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/io/scalajs/npm/express_sjs0.6_2.12/0.5.0/express_sjs0.6_2.12-0.5.0.pom


Reproducable example

build.sbt:

name := "hello-world"
version := "0.1"
scalaVersion := "2.12.10"
scalaJSModuleKind := org.scalajs.core.tools.linker.backend.ModuleKind.CommonJSModule
scalaJSUseMainModuleInitializer := false
enablePlugins(ScalaJSPlugin)

libraryDependencies += "io.scalajs.npm" %%% "express" % "0.5"

plugins.sbt:

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.31")
@TobiasRoland
Copy link
Author

If you've got pointers on how I could work around this to use 0.5, that would be great 👍 - otherwise I'll stick with the 0.4.x for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant