antonmedv/fx

Node.js or Deno required to use reducers?

mpicard opened this issue · 2 comments

Steps to reproduce

  1. install fx
  2. echo "{"test":"value"}" | fx .test
  3. see error message "Node or Deno required to use reducers

Current State

Simple queries do not work, needs more dependencies

Expected State

As something written in Go, I would expect it to be a standalone binary capable of working without other dependencies such as node/deno. The documentation even states:

Single Binary
Distributed as a single self-contained binary. Fx is easy to install and doesn't require external dependencies.

The issue you're encountering with the fx command-line tool seems to be related to its two main components and their respective dependencies. Fx is divided into a terminal JSON viewer and a JSON processor:

  1. Terminal JSON Viewer: This component is developed in Go and can function independently without additional runtime dependencies. It is likely the part that is referred to as a "single self-contained binary" in the documentation, emphasizing its ease of installation and operation without external dependencies.

  2. JSON Processor: This component, on the other hand, is designed in JavaScript. It requires either Node.js or Deno to be installed on your system to function properly. This is likely the cause of the error message you're receiving. When you try to use the JSON processing functionalities of fx, it looks for Node.js or Deno, which are necessary for these features to work.

So, while the fx tool is indeed distributed as a single binary and is easy to install, its full functionality, especially the parts written in JavaScript, requires Node.js or Deno.

Okay thanks for the clarification!