Running a command-line tool from a Node.js application in Replit

Hi folks!

I’m wondering if anyone can help me figure out how to run a command-line tool in a Node.js application, inside of Replit?

I’ve got this small Node.js application that has a text bot the user can fill out, and then they can lint the text using Vale (, which is a command-line tool. It’s using Node’s child_process package to execute the command, and everything is working correctly on my machine with Vale installed on my computer.

But when I try to run the application in Replit, I’m not getting any output from Vale. I was able to install Vale in my Replit by following Vale’s installation instructions, and I can run the vale command in the shell tab, but it doesn’t look like my Node application can execute the command, but I’m also not getting any error messages…

This is a link to my Repl:

Any ideas on how to fix this would be appreciated! :pray:

1 Like

Try using node-pty

Oh, I got it to work!

I had installed Vale by running the installation commands (using wget to download package, unzipping, adding it to $PATH). It looked like it had worked, but when I tried to run the vale command again, the Shell gave me this message:

vale: command not installed, but was located via Nix.
Would you like to run vale from Nix and add it to your replit.nix file? [Yn]: y

After installing it via Nix, everything works. :slight_smile:

Please mark a post as solved so the thread can close && people in the future can find the solution

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.