我正在尝试构建项目play-angular2-typescript,但它无法构建错误:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.webjars.npm#esprima;[3.1.0,3.2): not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.webjars.npm:esprima:[3.1.0,3.2)
[warn] +- org.webjars.npm:recast:[0.11.4,0.12)
[warn] +- org.webjars.npm:unreachable-branch-transform:[0.5.0,0.6)
[warn] +- org.webjars.npm:readable-stream:[2.0.5,3)
[warn] +- org.webjars.npm:got:[5.0.0,6)
[warn] +- org.webjars.npm:package-json:[2.0.0,3)
[warn] +- org.webjars.npm:latest-version:[2.0.0,3)
[warn] +- org.webjars.npm:update-notifier:[1.0.2,2)
[warn] +- org.webjars.npm:tslint:4.4.2
[warn] +- name.de-vries:sbt-tslint:4.4.2 (scalaVersion=2.10, sbtVersion=0.13) (/home/bravegag/code/play-angular2-typescript/project/plugins.sbt#L9-10)
[warn] +- default:play-angular2-typescript-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: org.webjars.npm#esprima;[3.1.0,3.2): not found
我在任何地方搜索过,在任何在线回购中找不到这些esprima
版本。我只能找到2.7.2版本。因此,我在build.sbt
文件中添加了以下行:
dependencyOverrides += "org.webjars.npm" % "esprima" % "2.7.2"
但是构建的sbt仍然失败并出现相同的错误。有办法解决这个问题吗?
更新答案导致:
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo1.maven.org/maven2/org/webjars/npm/esprima/3.1.3/esprima-3.1.3.jar ...
[info] [SUCCESSFUL ] org.webjars.npm#esprima;3.1.3!esprima.jar (214ms)
[info] Done updating.
答案 0 :(得分:1)
NPM和Bower WebJars的传递依赖关系不会自动部署,因此缺少这个依赖关系。我去添加它但是有一个许可证检测错误。我修好了它:https://github.com/webjars/webjars/issues/1569#issuecomment-285048591
部署更改后,我将部署esprima
3.1.3
。