mirror of
https://github.com/mthenw/frontail.git
synced 2026-04-26 02:05:57 +03:00
[GH-ISSUE #111] Windows support #79
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/frontail#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @naveenduttvyas on GitHub (Feb 10, 2018).
Original GitHub issue: https://github.com/mthenw/frontail/issues/111
installed uing npm command, and when executin below command, getting below error? how to make it work in windows?
frontail C:\Users\Test\Downloads\apache-samples\apache-error_log\error_log\syslog
Error received:
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn tail ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:686:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
@mthenw commented on GitHub (Oct 23, 2018):
The reason for that is that
frontailusestailOS command which is not present on Windows. I have a plan to migrate to node implementation rather than rely on OS binary. I cannot guarantee the timeline for that change though.@KidSquid1 commented on GitHub (Feb 1, 2019):
So I'm wondering what magic this guy used to get it up and running on Windows Server 2012?
https://community.openhab.org/t/habpanel-reloaded-modern-theme-skin-custom-widgets/43883/66
@KidSquid1 commented on GitHub (Feb 1, 2019):
Maybe this was used?
https://www.windows-commandline.com/tail-command-for-windows/
@KidSquid1 commented on GitHub (Feb 1, 2019):
ok, I've installed the resource pack and added the folder to the windows system path and I now have access to TAIL which works as intended...yet I see nothing in the browser window. I can see the scrolling in the command box but nothing in the browser....see screen cap below.

@posipov34 commented on GitHub (Jul 1, 2019):
The problem contains in two parts:
First - the windows resorce pack command tail.exe support either -n or the -f option, but not both. So it it needed to change execution parameters in /lib/tail.js
Second - the bug in the index.js code:
const io = new SocketIO({ path: path.join(urlPath, '/socket.io') });
the path.join(urlPath, '/socket.io') on windows gives a "\\socket.io" string instead of "/socket.io" on linux.
this is the reason why the socket.io is not working.
const io = new SocketIO({ path: path.join(urlPath, '/socket.io').replace(/\\/g,"/") });
wil help.
@KidSquid1 commented on GitHub (Jul 2, 2019):
@posipov34
Thank You...Thank You....Thank You..
I made the following changes:
tail.js
Line 27 -
if (process.platform === 'win32') {I changed the platform to win32 from the linux flavor that was currently listed.
index.js
Line 77 - replaced the entire line with
const io = new SocketIO({ path: path.join(urlPath, '/socket.io').replace(/\\/g,"/") });Started up frontail and boom....I now have it working.....
Thanks again for the information!!!
@upcdy commented on GitHub (Dec 12, 2019):
@KidSquid1 I tried to change the two file as your instruction and re run frontail c:\temp\syslog , but still got:
events.js:187
throw er; // Unhandled 'error' event
^
Error: spawn tail ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn tail',
path: 'tail',
spawnargs: [ '-n', 10, '-f', 'c:\temp\syslog' ]
}
is there any thing i can do? thanks!
@Steve-Mcl commented on GitHub (Jan 31, 2020):
hi @mthenw , it looks like @mojoaxel did some great work in replacing native tail with nodejs version.
Have these modifications been merged into your repo?
I ask as I recently installed on windows server (from NPM) and I got same error that the other guys got & had to manually patch
index.jsandtail.jsfiles & find a copy of tail for windows.If your answer is yes, then perhaps NPM needs updating?
Cheers.
@mojoaxel commented on GitHub (Jan 31, 2020):
Sadly the changes have not been merged (#175) but you can use my branch on windows if you need windows support!
@mthenw commented on GitHub (Feb 2, 2020):
I'm happy to merge those changes. @mojoaxel please open a new PR.
@mthenw commented on GitHub (Feb 3, 2020):
I published v4.9.0 with Windows support