3

When using Intellij idea with sbt, I got error:

[error] (updateSbtClassifiers) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/org/webjars/npm/4.2.0/npm-4.2.0-sources.jar: not found: https://repo1.maven.org/maven2/org/webjars/npm/4.2.0/npm-4.2.0-sources.jar

Intellij Idea Version: 2018.1 (yes I know it's old, but probably happened on newer version too)

How to solve this?

Arie
  • 476
  • 3
  • 9

1 Answers1

9

There's an (currently) open issue for that.

I'm not quite sure why is this happening, probably this stackoverflow answer would explain Why is this happening.

But to summarize there's an answer that works for me on that thread.

...
I think I solved the issue. In IntelliJ IDEA, go to 
Preferences => Build, Execution, Deployment => 
Build Tools => sbt => sbt projects. 

Untick "Library sources" & "sbt sources".

I tested it on 2019.3.4 & 2020.1. Both versions work correctly.
...

Hope this help others :)

Arie
  • 476
  • 3
  • 9