【发布时间】:2015-10-18 08:08:19
【问题描述】:
我无法运行新的 phoenix 应用程序。这是我得到的错误;我不确定是什么原因。
我尝试更改端口,但并没有改变行为。另外,我似乎能够正确运行节点。
Compiled web/views/error_view.ex
Compiled web/controllers/page_controller.ex
Compiled web/views/page_view.ex
Compiled web/views/layout_view.ex
Compiled lib/test_phoenix/endpoint.ex
Generated test_phoenix app
[info] Running TestPhoenix.Endpoint with Cowboy on port 4000 (http)
net.js:156
this._handle.open(options.fd);
^
Error: EINVAL, invalid argument
at new Socket (net.js:156:18)
at process.stdin (node.js:664:19)
at bindWatcherEvents (c:\Desarrollo\Phoenix\test_phoenix\node_modules\brunch\l
ib\watch.js:597:12)
at c:\******\Phoenix\test_phoenix\node_modules\brunch\lib\watch.js:667:9
at c:\******\Phoenix\test_phoenix\node_modules\brunch\lib\watch.js:557:16
at c:\******\Phoenix\test_phoenix\node_modules\brunch\lib\watch.js:188:12
at c:\******\Phoenix\test_phoenix\node_modules\brunch\node_modules\async-e
ach\index.js:24:44
at c:\******\Phoenix\test_phoenix\node_modules\brunch\lib\watch.js:175:14
at Object.cb [as oncomplete] (fs.js:168:19)
【问题讨论】:
-
似乎brunch 中的手表库在Windows 上不起作用。在您的情况下,一切都应该仍然有效,但不会自动编译资产(您现在需要手动运行
brunch build)。 -
您也可以将 brunch 更改为使用轮询:github.com/brunch/brunch/blob/master/docs/config.md 您应该可以将
watcher: { usePolling: true }添加到您的配置中。 -
@JoséValim 使用
watcher:{usePolling:true}未修复。 :( 还有其他建议吗? -
@JoséValim 这种类型的错误会影响我创建简单聊天应用程序的能力吗?似乎除此之外我没有收到任何错误,并且示例中的聊天应用程序无法正常工作...此错误似乎正在影响套接字,所以我想知道这是否是问题...
-
您需要能够编译您的资产。您可以使用
--no-brunch启动 Phoenix 应用程序,它将使用另一种机制生成资产。此错误的另一个可能来源是 Node.JS 版本。你有哪一个?