javascript - Add js library from npm as dependency to Play 2.0 app -
i'm trying add react-grid-layout play 2.0 web app. firstly, found web jar library , add build.sbt. sbt looks follows:
librarydependencies ++= seq( jdbc, cache, ws, specs2 % test, "org.webjars" %% "webjars-play" % "2.4.0-1", "org.webjars" % "react" % "0.14.0", "org.webjars" % "marked" % "0.3.2", "org.webjars" % "jquery" % "2.1.4", "org.webjars.npm" % "react-grid-layout" % "0.9.1" )
in routes have
get /webjars/*file controllers.webjarassets.at(file)
all libraries except react-grid installed target/web/web-modules directory. so, guess problem npm org.webjars.npm .
what should install every js library correctly?
james explains in following github issue.
deployment manual libraries , dependencies. can npm & bower webjars. think / easy first step present list of missing transitive dependencies when deployment finishes. make easy walk through tree manually deploy everything.
he later adds:
it possible webjar trying use failing because of missing transitive dependencies. happens when libraries missing required metadata can't imported maven central. unfortunate situation there isn't can fix it. alternative use classic webjars instead. info on creating classic webjars: http://www.webjars.org/contributing
check full github issue linked above full conversation.
Comments
Post a Comment