我正在尝试运行一些node.js
个包,同时通过scala.system.process
构建scala项目。设为yarn -v
。
lazy val ttt = taskKey[Unit]("Some task")
ttt := {
import scala.sys.process._
Seq("yarn.cmd", "-v").!
}
输出:
module.js:549
throw err;
^
Error: Cannot find module 'C:\Users\08407540\IdeaProjects\test\node_modules\yarn\bin\yarn.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
如何使SBT
运行包,例如scala源代码?
答案 0 :(得分:1)
lazy val ttt = taskKey[Unit]("Some task")
ttt := {
import scala.sys.process._
Seq("cmd", "/c", "yarn", "-v").!
}
为我工作