`activator ~ run` 不起作用 [英] `activator ~ run` doesn't work

查看:22
本文介绍了`activator ~ run` 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当运行 activator ~ run 时,会发生以下情况:

When running activator ~ run, here is what happens:

  1. 当开发服务器第一次运行时,我在控制台中收到一条消息,说服务器正在侦听端口 9000.
  2. 现在,当我更改文件并保存时,控制台不会输出任何内容.
  3. 但是,当我刷新页面时,我会在控制台中看到有关重新加载的消息,并且浏览器会加载.

我认为 ~ run 意味着在每次文件更改时重新运行?

I thought ~ run meant re-run at every file change?

推荐答案

打开你的 build.sbt 文件并检查它是否包含类似 fork in run := true 的行在里面.如果是,请删除该行或将值设置为 false.

Open your build.sbt file and check if it contains line like fork in run := true in it. If it does, delete the line or set the value to false.

这是为什么?

Activator UI 需要这个 fork 来生成进程,所以每次当你从 UI 启动你的应用程序时,它首先添加一行以确保它存在.无论如何,它会导致一些热重载问题(以及其他一些奇怪的事情,例如应用程序挂起、内存泄漏).

this fork is required by Activator UI to spawn the processes, so every time, when you are starting your app from UI, it adds the line first to make sure that will exist. Anyway it causes some problems with hot reload (and also some other weird things, like app hanging, memory leaks).

这篇关于`activator ~ run` 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆